Browse Source

[优化] 查看模式选中效果改变

develop
徐振升 4 years ago
parent
commit
4a69ae2f7a
  1. 24
      src/app/working-area/working-area.component.ts

24
src/app/working-area/working-area.component.ts

@ -248,19 +248,27 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// this.createEnterPaintEndButton(); // this.createEnterPaintEndButton();
// this.backgroundImage.addChild(this.paintingLine); // this.backgroundImage.addChild(this.paintingLine);
this.on('select', obj => { this.on('select', obj => {
if (obj instanceof MultipointIcon) { if (this.allowEdit) {
obj.setPointVisiable(true); if (obj instanceof MultipointIcon) {
} else if (obj instanceof PolygonIcon) { obj.setPointVisiable(true);
obj.setPointVisiable(true); } else if (obj instanceof PolygonIcon) {
obj.setPointVisiable(true);
} else {
obj.filters = [this.outlineFilterGreen];
}
} else { } else {
obj.filters = [this.outlineFilterGreen]; obj.filters = [this.outlineFilterGreen];
} }
}); });
this.on('deselect', obj => { this.on('deselect', obj => {
if (obj instanceof MultipointIcon) { if (this.allowEdit) {
obj.setPointVisiable(false); if (obj instanceof MultipointIcon) {
} else if (obj instanceof PolygonIcon) { obj.setPointVisiable(false);
obj.setPointVisiable(false); } else if (obj instanceof PolygonIcon) {
obj.setPointVisiable(false);
} else {
obj.filters = [];
}
} else { } else {
obj.filters = []; obj.filters = [];
} }

Loading…
Cancel
Save