From 95c1f10a276a69ce4fdcc72e68a35c796581d143 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 11 Jun 2021 16:19:19 +0800
Subject: [PATCH] 左侧目录树优化,及搜索部分样式调整,部分图片路径更改
---
widgets/LeftNavigationBar/Widget.js | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/widgets/LeftNavigationBar/Widget.js b/widgets/LeftNavigationBar/Widget.js
index de6441b..c9ef115 100644
--- a/widgets/LeftNavigationBar/Widget.js
+++ b/widgets/LeftNavigationBar/Widget.js
@@ -198,6 +198,7 @@
})
},
changeData: function (val, type) { //重写数据
+ var that = this;
var data = [],
i = 1,
inits = (d, childData) => {
@@ -227,6 +228,21 @@
a.model = true
}
+ if (a.model) {
+
+ if (that[a.id]) {
+ Cesium.when(that[a.id], function (layer) {
+ that.map.scene.layers.remove(layer[0].name)
+ })
+ }
+
+ } else {
+
+ if (that[a.id]) {
+ that.map.imageryLayers.remove(that[a.id]);
+ }
+
+ }
b.push(a);
i++;
@@ -234,7 +250,7 @@
b[k].children = [];
b[k].who = 'father';
inits(d[k].children, b[k].children)
- }
+ }
}
};
@@ -444,6 +460,7 @@
//添加S3M图层服务
that[obj.data.id] = scene.open(host + partOfUrl);
//定位到场景
+
Cesium.loadJson(host + partOfUrl + '/scenes.json').then(function (scenes) {
// var sname = scenes[0].name;
// Cesium.loadJson(host + partOfUrl + '/scenes/' + sname + '.json').then(function (jsonData) {
--
Gitblit v1.9.3