From 76dbd23a79bac59210fb99cfdc46a905ada89ba9 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 23 Jun 2021 17:00:44 +0800
Subject: [PATCH] 细节
---
widgets/spatialAnalysis/Widget.js | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/widgets/spatialAnalysis/Widget.js b/widgets/spatialAnalysis/Widget.js
index 26fb6ba..496e0f7 100644
--- a/widgets/spatialAnalysis/Widget.js
+++ b/widgets/spatialAnalysis/Widget.js
@@ -262,10 +262,10 @@
topic.subscribe("appendTiltS", lang.hitch(this, this.appendTiltS));
topic.subscribe("removeTiltS", lang.hitch(this, this.removeTiltS));
- this.liClick('默认:天地图影像','默认:天地图影像');
+ this.liClick('默认:天地图影像', '默认:天地图影像');
},
- liClick: function (itemid,name) {
+ liClick: function (itemid, name) {//点击事件
var liList = $(`[itemid='${itemid}s']`);
// console.log(liList);
liList.click(() => {
@@ -290,7 +290,7 @@
// console.log(liList)
// console.log($('#SelectLayerToolItemTitle'))
for (var i = 0; i < liList.length; i++) {
- if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
+ if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
flag = false
}
}
@@ -306,7 +306,7 @@
$("#SelectLayerToolItemTitle").append(liItem);
}
- that.liClick(obj.id,obj.title);
+ that.liClick(obj.id, obj.title);
}
},
removeItemS: function (item, obj) {
@@ -314,7 +314,7 @@
if (item == this.fakeName) {
var liList = $("#SelectLayerToolItemTitle li");
for (var i = 0; i < liList.length; i++) {
- if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
+ if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
$(liList[i]).remove();
}
}
@@ -341,7 +341,7 @@
for (var i = 0; i < liList.length; i++) {
- if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
+ if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
flag = false
}
@@ -355,7 +355,7 @@
$("#SelectLayerToolItemTitle").append(liItem);
}
- that.liClick(obj.id,obj.title);
+ that.liClick(obj.id, obj.title);
}
},
removeTiltS: function (item, obj) {
@@ -363,7 +363,7 @@
if (item == this.fakeName) {
var liList = $("#SelectLayerToolItemTitle li");
for (var i = 0; i < liList.length; i++) {
- if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id) {
+ if ($(liList[i]).attr('itemid') && $(liList[i]).attr('itemid') == obj.id + 's') {
$(liList[i]).remove();
}
}
--
Gitblit v1.9.3