From 93a9b3228d214602a899791992726a01925c5ac4 Mon Sep 17 00:00:00 2001
From: ChenZeping02609 <chenzeping02609@163.com>
Date: 星期四, 13 五月 2021 14:20:07 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
---
src/components/LayerController/logic/PipeLineAnimal.js | 55 +++++++++++++++++++++++--------------------------------
1 files changed, 23 insertions(+), 32 deletions(-)
diff --git a/src/components/LayerController/logic/PipeLineAnimal.js b/src/components/LayerController/logic/PipeLineAnimal.js
index f712d96..11c54ef 100644
--- a/src/components/LayerController/logic/PipeLineAnimal.js
+++ b/src/components/LayerController/logic/PipeLineAnimal.js
@@ -7,24 +7,29 @@
module.exports = function () {
this.init = () => {
+ }
+
+ this.start = () => {
const layers = LayerPipeLines.layers
for (var i = 0; i < layers.length; i++) {
const config = layers[i]
const code = config.code
+ const styles = config.styles
// window.layerFactory.show(config)
const layer = window.layerFactory.layers[code]
if (layer) {
if (layer.eachLayer) {
layer.eachLayer(function (layer) {
+ var newStyles = Object.assign(STYLES, styles)
layer.setStyle({
- fill: STYLES.FILL,
- weight: STYLES.WEIGHT,
- fillColor: STYLES.FILL_COLOR,
- color: STYLES.COLOR,
- fillOpacity: STYLES.FILL_OPACITY,
- opacity: STYLES.OPACITY,
- dashArray: STYLES.DASH_ARRAY,
- dashSpeed: STYLES.DASH_SPPED
+ fill: newStyles.FILL,
+ weight: newStyles.WEIGHT,
+ fillColor: newStyles.FILL_COLOR,
+ color: newStyles.COLOR,
+ fillOpacity: newStyles.FILL_OPACITY,
+ opacity: newStyles.OPACITY,
+ dashArray: newStyles.DASH_ARRAY,
+ dashSpeed: newStyles.DASH_SPPED
})
})
// 閲嶆柊娣诲姞鍒板湴鍥句笂锛屽姩鐢绘墠鏈夋晥鏋�
@@ -33,43 +38,29 @@
}
}
}
- /* window.$layer.iframe({
- content: {
- content: publicBounced,
- parent: this,
- data: {
- info: this.info,
- fn: () => {
- alert(1)
- }
- }
- },
- area: ['901px', '101px'],
- title: '杩欐槸涓�涓爣棰樿繖鏄竴涓爣棰樿繖鏄竴涓爣棰樿繖鏄竴涓爣棰�',
- maxmin: true,
- shade: false,
- shadeClose: false,
- scrollbar: false,
- resize: true,
- btn: ['a', 'b'],
- cancel: () => {
- alert(2110)
- }
- }) */
}
this.destory = () => {
- console.log('destory!!!')
const layers = LayerPipeLines.layers
for (var i = 0; i < layers.length; i++) {
const config = layers[i]
const code = config.code
+ const styles = config.styles
// window.layerFactory.show(config)
const layer = window.layerFactory.layers[code]
if (layer) {
if (layer.eachLayer) {
layer.eachLayer(function (layer) {
layer.resetStyle()
+ var newStyles = Object.assign(STYLES, styles)
+ layer.setStyle({
+ fill: newStyles.FILL,
+ weight: newStyles.WEIGHT,
+ fillColor: newStyles.FILL_COLOR,
+ color: newStyles.COLOR,
+ fillOpacity: newStyles.FILL_OPACITY,
+ opacity: newStyles.OPACITY
+ })
})
}
}
--
Gitblit v1.8.0