From 4a69ae2f7ae951815a566c9903ff90fa81909a02 Mon Sep 17 00:00:00 2001 From: "DESKTOP-474NEJQ\\xzsjob" <359059686@qq.com> Date: Mon, 21 Sep 2020 17:28:32 +0800 Subject: [PATCH] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E9=80=89=E4=B8=AD=E6=95=88=E6=9E=9C=E6=94=B9?= =?UTF-8?q?=E5=8F=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../working-area/working-area.component.ts | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 72950e7..b49a02e 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -248,19 +248,27 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // this.createEnterPaintEndButton(); // this.backgroundImage.addChild(this.paintingLine); this.on('select', obj => { - if (obj instanceof MultipointIcon) { - obj.setPointVisiable(true); - } else if (obj instanceof PolygonIcon) { - obj.setPointVisiable(true); + if (this.allowEdit) { + if (obj instanceof MultipointIcon) { + obj.setPointVisiable(true); + } else if (obj instanceof PolygonIcon) { + obj.setPointVisiable(true); + } else { + obj.filters = [this.outlineFilterGreen]; + } } else { obj.filters = [this.outlineFilterGreen]; } }); this.on('deselect', obj => { - if (obj instanceof MultipointIcon) { - obj.setPointVisiable(false); - } else if (obj instanceof PolygonIcon) { - obj.setPointVisiable(false); + if (this.allowEdit) { + if (obj instanceof MultipointIcon) { + obj.setPointVisiable(false); + } else if (obj instanceof PolygonIcon) { + obj.setPointVisiable(false); + } else { + obj.filters = []; + } } else { obj.filters = []; }