问题修复
This commit is contained in:
parent
f168f2a3e6
commit
3aeab25aab
|
|
@ -218,6 +218,7 @@ body {
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: rgba(0, 0, 0, 0.6);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
|
visibility: visible;
|
||||||
|
|
||||||
/* display: flex;
|
/* display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
@ -357,6 +358,19 @@ body {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.project-overview-open-drawer-btn {
|
||||||
|
bottom: 40px;
|
||||||
|
left: 0;
|
||||||
|
position: absolute;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 14px 14px 14px 0;
|
||||||
|
border-color: transparent #d7d7d7 transparent transparent;
|
||||||
|
z-index: 999;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.close-drawer-btn {
|
.close-drawer-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
|
|
|
||||||
|
|
@ -1416,6 +1416,11 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||||
const legendDrawer = document.querySelector(".legend-box");
|
const legendDrawer = document.querySelector(".legend-box");
|
||||||
const legendOpenBtn = document.querySelector(".legend-open-drawer-btn");
|
const legendOpenBtn = document.querySelector(".legend-open-drawer-btn");
|
||||||
|
|
||||||
|
const projectOverview = document.querySelector(".project-overview-box");
|
||||||
|
const overviewOpenDrawerBtn = document.querySelector(
|
||||||
|
".project-overview-open-drawer-btn"
|
||||||
|
);
|
||||||
|
|
||||||
// const closeBtn = document.querySelector(".close-drawer-btn");
|
// const closeBtn = document.querySelector(".close-drawer-btn");
|
||||||
|
|
||||||
// 点击三角按钮打开抽屉
|
// 点击三角按钮打开抽屉
|
||||||
|
|
@ -1516,50 +1521,63 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||||
legendOpenBtn.style.transform = "rotate(0deg)";
|
legendOpenBtn.style.transform = "rotate(0deg)";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
overviewOpenDrawerBtn.addEventListener("click", function () {
|
||||||
|
if (projectOverview.style.visibility === "visible") {
|
||||||
|
projectOverview.style.visibility = "hidden";
|
||||||
|
// 修改图例的三角
|
||||||
|
|
||||||
// 点击全屏图标时 使地图盒子全屏
|
overviewOpenDrawerBtn.style.transform = "rotate(180deg)";
|
||||||
const fullScreenBtn = document.querySelector(".full-screen-btn");
|
|
||||||
fullScreenBtn.addEventListener("click", function () {
|
|
||||||
if (document.fullscreenElement) {
|
|
||||||
// 退出全屏
|
|
||||||
document.exitFullscreen();
|
|
||||||
} else {
|
} else {
|
||||||
// 进入全屏
|
projectOverview.style.visibility = "visible";
|
||||||
document.documentElement.requestFullscreen();
|
// 修改图例的三角
|
||||||
// 遍历树形结构数据把数据全部更改为第一个工程
|
|
||||||
if (
|
|
||||||
treeData[0].children &&
|
|
||||||
treeData[0].children.length > 0 &&
|
|
||||||
treeData[0].children[0].children &&
|
|
||||||
treeData[0].children[0].children.length > 0
|
|
||||||
) {
|
|
||||||
nodeId = treeData[0].children[0].children[0].id;
|
|
||||||
if (
|
|
||||||
treeData[0].children[0].children[0].lon &&
|
|
||||||
treeData[0].children[0].children[0].lat
|
|
||||||
) {
|
|
||||||
intLng = treeData[0].children[0].children[0].lon;
|
|
||||||
intLat = treeData[0].children[0].children[0].lat;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (treeData[0].children[0].children[0].title) {
|
overviewOpenDrawerBtn.style.transform = "rotate(0deg)";
|
||||||
projectTitle = treeData[0].children[0].children[0].title;
|
|
||||||
$(".center-title-box").text(projectTitle + "作战图");
|
|
||||||
}
|
|
||||||
|
|
||||||
// getScrollData(nodeId);
|
|
||||||
$(".project-overview-content").text(
|
|
||||||
treeData[0].children[0].children[0].projectOverview ||
|
|
||||||
"暂无"
|
|
||||||
);
|
|
||||||
getLegendData(nodeId);
|
|
||||||
getLocationInfo(nodeId);
|
|
||||||
} else {
|
|
||||||
initMap();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 点击全屏图标时 使地图盒子全屏
|
||||||
|
// const fullScreenBtn = document.querySelector(".full-screen-btn");
|
||||||
|
// fullScreenBtn.addEventListener("click", function () {
|
||||||
|
// if (document.fullscreenElement) {
|
||||||
|
// // 退出全屏
|
||||||
|
// document.exitFullscreen();
|
||||||
|
// } else {
|
||||||
|
// // 进入全屏
|
||||||
|
// document.documentElement.requestFullscreen();
|
||||||
|
// // 遍历树形结构数据把数据全部更改为第一个工程
|
||||||
|
// if (
|
||||||
|
// treeData[0].children &&
|
||||||
|
// treeData[0].children.length > 0 &&
|
||||||
|
// treeData[0].children[0].children &&
|
||||||
|
// treeData[0].children[0].children.length > 0
|
||||||
|
// ) {
|
||||||
|
// nodeId = treeData[0].children[0].children[0].id;
|
||||||
|
// if (
|
||||||
|
// treeData[0].children[0].children[0].lon &&
|
||||||
|
// treeData[0].children[0].children[0].lat
|
||||||
|
// ) {
|
||||||
|
// intLng = treeData[0].children[0].children[0].lon;
|
||||||
|
// intLat = treeData[0].children[0].children[0].lat;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (treeData[0].children[0].children[0].title) {
|
||||||
|
// projectTitle = treeData[0].children[0].children[0].title;
|
||||||
|
// $(".center-title-box").text(projectTitle + "作战图");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // getScrollData(nodeId);
|
||||||
|
// $(".project-overview-content").text(
|
||||||
|
// treeData[0].children[0].children[0].projectOverview ||
|
||||||
|
// "暂无"
|
||||||
|
// );
|
||||||
|
// getLegendData(nodeId);
|
||||||
|
// getLocationInfo(nodeId);
|
||||||
|
// } else {
|
||||||
|
// initMap();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
// 设置当鼠标移入工程概况时,并且判断当前是否溢出,溢出时预览框显示
|
// 设置当鼠标移入工程概况时,并且判断当前是否溢出,溢出时预览框显示
|
||||||
const projectOverviewBox = document.querySelector(".project-overview-box");
|
const projectOverviewBox = document.querySelector(".project-overview-box");
|
||||||
const projectOverviewContent = document.querySelector(
|
const projectOverviewContent = document.querySelector(
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,9 @@
|
||||||
<!-- 打开或者关闭图例的三角 -->
|
<!-- 打开或者关闭图例的三角 -->
|
||||||
<div class="legend-open-drawer-btn"></div>
|
<div class="legend-open-drawer-btn"></div>
|
||||||
|
|
||||||
|
<!-- 打开或者关闭工程概况的三角 -->
|
||||||
|
<div class="project-overview-open-drawer-btn"></div>
|
||||||
|
|
||||||
|
|
||||||
<!-- 右上角切换按钮 -->
|
<!-- 右上角切换按钮 -->
|
||||||
<!-- <div class="switch-btn-box">
|
<!-- <div class="switch-btn-box">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue