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 = []; }