diff --git a/src/iscs/constant/deviceRender.js b/src/iscs/constant/deviceRender.js index 174a3aafc..126a8b9a9 100644 --- a/src/iscs/constant/deviceRender.js +++ b/src/iscs/constant/deviceRender.js @@ -270,7 +270,7 @@ deviceRender[deviceType.ArcStatus] = { deviceRender[deviceType.IscsButton] = { _type: deviceType.IscsButton, zlevel: 1, - z: 4 + z: 5 }; /** 状态表 */ deviceRender[deviceType.StateTable] = { diff --git a/src/iscs/shape/button.js b/src/iscs/shape/button.js index 353854727..000eb663a 100644 --- a/src/iscs/shape/button.js +++ b/src/iscs/shape/button.js @@ -27,6 +27,7 @@ export default class Button extends Group { this.buttonText = new Text({ zlevel: model.zlevel, z: model.z + 1, + z2: model.z2 || 0, style: { x: 0, y: 0, @@ -46,6 +47,7 @@ export default class Button extends Group { this.imageButton = new Image({ zlevel: model.zlevel, z: model.z, + z2: model.z2 || 0, style: { x: textRect.x - model.levelPadding, y: textRect.y - model.verticalPadding, @@ -61,6 +63,7 @@ export default class Button extends Group { this.textButtonRect = new Rect({ zlevel: model.zlevel, z: model.z, + z2: model.z2 || 0, shape: { x: textRect.x - model.levelPadding, y: textRect.y - model.verticalPadding, @@ -75,6 +78,7 @@ export default class Button extends Group { this.lineLeftTop = new Polyline({ zlevel: model.zlevel, z: model.z, + z2: model.z2 || 0, draggable: false, shape: { points: [ @@ -91,6 +95,7 @@ export default class Button extends Group { this.lineBottomRight = new Polyline({ zlevel: model.zlevel, z: model.z, + z2: model.z2 || 0, draggable: false, shape: { points: [ @@ -111,6 +116,7 @@ export default class Button extends Group { this.textButtonRectSmall = new Rect({ zlevel: model.zlevel, z: model.z, + z2: model.z2 || 0, shape: { x: textRect.x - model.levelPadding + 6, y: textRect.y - model.verticalPadding + 6, @@ -145,7 +151,6 @@ export default class Button extends Group { this.add(this.grouper); this.on('mouseout', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColor || '#FFF'}); }); this.on('mouseover', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColorActive || '#000'}); }); - } setModel(dx, dy) { this.model.point.x += dx; diff --git a/src/views/iscs/iscsDraw/icscComponents/button.vue b/src/views/iscs/iscsDraw/icscComponents/button.vue index 14dd7928f..2fbe35333 100644 --- a/src/views/iscs/iscsDraw/icscComponents/button.vue +++ b/src/views/iscs/iscsDraw/icscComponents/button.vue @@ -1,6 +1,9 @@