From 31fd525edda7e78dfa1badd04e6f9f23f20af664 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期五, 12 一月 2024 10:55:12 +0800 Subject: [PATCH] 修改编辑功能 --- TEWin/Resources/SpaceStatistics/SpaceStatistics.html | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/TEWin/Resources/SpaceStatistics/SpaceStatistics.html b/TEWin/Resources/SpaceStatistics/SpaceStatistics.html index 77bdd0d..8f5ca6f 100644 --- a/TEWin/Resources/SpaceStatistics/SpaceStatistics.html +++ b/TEWin/Resources/SpaceStatistics/SpaceStatistics.html @@ -40,6 +40,15 @@ maxHeight: 0, // 涓夌淮浣撴渶楂橀珮搴� reset: function () { + var layers = getFeatureLayers(); + for (var i in layers) { + try{ + SGWorld.ProjectTree.GetObject(layers[i]).Refresh(); + } catch (e) { + console.log(e); + } + } + this.count = 0; this.lineLen = 0; this.polyArea = 0; @@ -49,7 +58,7 @@ return this; }, - + format: function () { this.lineLen = parseFloat(this.lineLen.toFixed(2)); this.polyArea = parseFloat(this.polyArea.toFixed(2)); @@ -90,9 +99,7 @@ var gid = SGWorld.ProjectTree.FindItem(groupName); if (gid) SGWorld.ProjectTree.DeleteItem(gid); } - catch (e) { - console.log(e); - } + catch (e) { } } function getFeatureLayers() { @@ -139,13 +146,11 @@ if (fs.Count == 0) continue; rs.count += fs.Count; - if (layer.GeometryType == 1) { // LGT_POLYLINE for (var j = 0; j < fs.Count; j++) { var f = fs.Item(j); rs.lineLen += f.Geometry.Length; } - continue; } if (layer.GeometryType == 2) { // LGT_POLYGON var flag = layerName == layer.TreeItem.Name; @@ -164,7 +169,11 @@ } } } + for (var i = 0; i < fs.Count; i++) { + fs.Item(i).Tint.abgrColor = 0xff800080; + } } catch (e) { + console.log(e); layers.splice(i, 1); } } -- Gitblit v1.9.3