Browse Source

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

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

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

@ -248,6 +248,7 @@ 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 (this.allowEdit) {
if (obj instanceof MultipointIcon) { if (obj instanceof MultipointIcon) {
obj.setPointVisiable(true); obj.setPointVisiable(true);
} else if (obj instanceof PolygonIcon) { } else if (obj instanceof PolygonIcon) {
@ -255,8 +256,12 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else { } else {
obj.filters = [this.outlineFilterGreen]; obj.filters = [this.outlineFilterGreen];
} }
} else {
obj.filters = [this.outlineFilterGreen];
}
}); });
this.on('deselect', obj => { this.on('deselect', obj => {
if (this.allowEdit) {
if (obj instanceof MultipointIcon) { if (obj instanceof MultipointIcon) {
obj.setPointVisiable(false); obj.setPointVisiable(false);
} else if (obj instanceof PolygonIcon) { } else if (obj instanceof PolygonIcon) {
@ -264,6 +269,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
} else { } else {
obj.filters = []; obj.filters = [];
} }
} else {
obj.filters = [];
}
}); });
this.on('backgroundScale', scale => { this.on('backgroundScale', scale => {
this.backgroundImage.children.forEach(item => { this.backgroundImage.children.forEach(item => {

Loading…
Cancel
Save