From db45def58993c3ed79b47f1a0ec19740ec229211 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 11 Jun 2021 11:22:24 +0800
Subject: [PATCH] 工具下面做相关更改,及逻辑优化
---
widgets/Rolling/Widget.js | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/widgets/Rolling/Widget.js b/widgets/Rolling/Widget.js
index ec040f5..d7c4cf6 100644
--- a/widgets/Rolling/Widget.js
+++ b/widgets/Rolling/Widget.js
@@ -69,6 +69,7 @@
startup: function () {
topic.subscribe("openRolling", lang.hitch(this, this.openRolling));
+ topic.subscribe("closeRolling", lang.hitch(this, this.closeRolling));
var that = this;
// 点击卷帘关闭面板
$('.rollinng-table-hezi-xx').click(function () {
@@ -78,16 +79,16 @@
that.map.imageryLayers.remove(that.earthAtNightRight);
that.map.imageryLayers.remove(that.zjRight);
-
-
+
+
that.map.imageryLayers.remove(that.tiandituLeft);
that.map.imageryLayers.remove(that.tiandituZJLeft);
that.map.imageryLayers.remove(that.tiandituRight);
that.map.imageryLayers.remove(that.tiandituZJRight);
-
+
$('.jimu-widget-Rolling').hide();
-
+
});
// 加载左边图层
@@ -113,7 +114,7 @@
loadMapRight();
} else if ($(this).val() == 1) {
loadMapTianRight();
- }
+ }
});
// 加载左边天地图影像图层方法
@@ -225,6 +226,29 @@
}
},
+ closeRolling: function (item) {
+ if (item == this.name) {
+ var that = this;
+ if (this.flag == true) {
+ this.flag = false;
+ that.map.imageryLayers.remove(that.earthAtNightLeft);
+ that.map.imageryLayers.remove(that.zjLeft);
+
+ that.map.imageryLayers.remove(that.earthAtNightRight);
+ that.map.imageryLayers.remove(that.zjRight);
+
+
+ that.map.imageryLayers.remove(that.tiandituLeft);
+ that.map.imageryLayers.remove(that.tiandituZJLeft);
+
+ that.map.imageryLayers.remove(that.tiandituRight);
+ that.map.imageryLayers.remove(that.tiandituZJRight);
+
+ $('.jimu-widget-Rolling').hide();
+ }
+ }
+ },
+
onOpen: function () {
var that = this;
if (this.flag != true) return;
@@ -244,7 +268,7 @@
that.earthAtNightLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
that.zjLeft.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.LEFT, Cesium.ImagerySplitDirection.NONE);
-
+
that.tiandituRight = that.map.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider(
that.imageryProviderDian[0]
));
@@ -254,6 +278,8 @@
that.tiandituRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
that.tiandituZJRight.splitDirection = new Cesium.Cartesian2(Cesium.ImagerySplitDirection.RIGHT, Cesium.ImagerySplitDirection.NONE);
+
+ $('.jimu-widget-Rolling').show();
},
--
Gitblit v1.9.3