镜像处理逻辑调整
This commit is contained in:
parent
a116149775
commit
3239e8862e
@ -54,6 +54,15 @@ export class Signal extends JlGraphic {
|
||||
return this.getDatas<ISignalData>();
|
||||
}
|
||||
|
||||
get mirror(): boolean {
|
||||
return this.datas.mirror;
|
||||
}
|
||||
set mirror(v: boolean) {
|
||||
const old = this.datas.clone();
|
||||
old.mirror = v;
|
||||
this.updateData(old);
|
||||
}
|
||||
|
||||
paint(): void {
|
||||
const mirror = this.datas.mirror;
|
||||
this.lampMainBody.paint(signalConsts.lampNum, mirror);
|
||||
|
@ -158,9 +158,8 @@ export class signalInteraction extends GraphicInteractionPlugin<Signal> {
|
||||
const signal = target.getGraphic() as Signal;
|
||||
this.app.updateSelected(signal);
|
||||
mirrorFlipConfig.handler = () => {
|
||||
signal.datas.mirror = !signal.datas.mirror;
|
||||
signal.doRepaint();
|
||||
// console.log('*****mirror', signal);
|
||||
signal.mirror = !signal.mirror;
|
||||
// signal.doRepaint();
|
||||
};
|
||||
SignalEditMenu.open(e.global);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user