liuyg
2021-06-22 c3bb18b5acb4c8453c6f86a376dd37bd93ae3bc3
空间分析关闭逻辑修改
2 files modified
31 ■■■■ changed files
widgets/digTheEarth/Widget.js 21 ●●●●● patch | view | raw | blame | history
widgets/spatialAnalysis/Widget.js 10 ●●●●● patch | view | raw | blame | history
widgets/digTheEarth/Widget.js
@@ -175,21 +175,18 @@
                that.handlerPolygon = handlerPolygon;
            },
            handlerPolygon: '',
            closesDigTheEarth: function (froms) {
            closesDigTheEarth: function () {
                // console.log('gaunbi');
                var that = this;
                if (froms == 'frist') {
                    // console.log('frist');
                } else {
                    that.map.scene.globe.removeAllExcavationRegion();
                    if (that.handlerPolygon.polygon) {
                        that.handlerPolygon.polygon.show = false;
                    }
                    if (that.handlerPolygon.polyline) {
                        that.handlerPolygon.polyline.show = false;
                    }
                    that.handlerPolygon.deactivate();
                that.map.scene.globe.removeAllExcavationRegion();
                if (that.handlerPolygon.polygon) {
                    that.handlerPolygon.polygon.show = false;
                }
                if (that.handlerPolygon.polyline) {
                    that.handlerPolygon.polyline.show = false;
                }
                that.handlerPolygon.deactivate();
            },
            onOpen: function () {
widgets/spatialAnalysis/Widget.js
@@ -31,7 +31,7 @@
                var that = this;
                // 暴露在外的接口
                var domHtmls = [
                var domHtmls = [//默认
                    {
                        name: '可视分析',
                        classs: 'visibleArea-tool',
@@ -194,7 +194,7 @@
                })
                //地形开挖
                $('.digTheEarth-tool').click(function () {
                    that.closeOnceUse('frist');
                    that.closeOnceUse('digTheEarth');
                    $(".jimu-widget-digTheEarth").show();
                    topic.publish('beginDigTheEarth', 'beginDigTheEarth');
@@ -240,8 +240,10 @@
                $(".jimu-widget-SQLQuery").hide();
                topic.publish('closesSQL', 'closesSQL');
                //关闭地形开挖
                $(".jimu-widget-digTheEarth").hide();
                topic.publish('closesDigTheEarth', who);
                if (who != 'digTheEarth') {
                    $(".jimu-widget-digTheEarth").hide();
                    topic.publish('closesDigTheEarth');
                }
            },
            onOpen: function () {