From 114516abb8e1f0d3762eaa88e47a8fbbd4b7200a Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 15 Oct 2020 15:28:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=BC=E5=90=88=E7=9B=91?= =?UTF-8?q?=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/iscs/constant/deviceRender.js | 2 +- src/iscs/shape/button.js | 7 ++++++- src/views/iscs/iscsDraw/icscComponents/button.vue | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) 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 @@