派生自 wuyushui/SewerAndRainNetwork

chenzeping
2021-03-16 e9a64e037bd76e6fbe5cd4b4043e27c1fb0a2e85
修改
1个文件已修改
18 ■■■■■ 已修改文件
src/components/panel/ToolBoxPanel.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/panel/ToolBoxPanel.vue
@@ -242,8 +242,6 @@
    },
    choiceItem (itemT, indexT) {
      this.Selecd = indexT
      // eslint-disable-next-line no-unused-vars
      const layerGroups = []
      switch (itemT.label) {
        case '点标绘':
          var myIcon = this.L.icon({
@@ -252,15 +250,13 @@
            iconAnchor: [13, 16],
            popupAnchor: [26, -32]
          })
          // eslint-disable-next-line no-case-declarations
          const drawLayer = this.map.editTools.startMarker()
          var drawLayer = this.map.editTools.startMarker()
          drawLayer.setIcon(myIcon)
          this.drawLayer.addLayer(drawLayer)
          this.drawLayer.addLayer(this.setLogic(drawLayer))
          this.setLogic(drawLayer)
          break
        case '线标绘':
          // eslint-disable-next-line no-case-declarations
          const drawLayerLine = this.map.editTools.startPolyline()
          var drawLayerLine = this.map.editTools.startPolyline()
          this.drawLayer.addLayer(drawLayerLine)
          this.setLogic(drawLayerLine)
          break
@@ -275,8 +271,7 @@
          this.setLogic(drawLayerPolygonJ)
          break
        case '圆形':
          // eslint-disable-next-line no-case-declarations
          const drawLayerPolygonY = this.map.editTools.startCircle()
          var drawLayerPolygonY = this.map.editTools.startCircle()
          this.drawLayer.addLayer(drawLayerPolygonY)
          this.setLogic(drawLayerPolygonY)
          break
@@ -322,7 +317,10 @@
    setLogic (layer) {
      layer.on('dblclick', this.L.DomEvent.stop).on('dblclick', layer.toggleEdit)
      layer.setStyle({
        color: 'red'
        color: 'red',
        fillColor: '#ffffff',
        fillOpacity: 0.1,
        fill: true
      })
    }
  }