信号机调整

This commit is contained in:
fan 2023-06-08 15:18:54 +08:00
parent 40d3b2e863
commit ecd7c5e8dc
2 changed files with 10 additions and 4 deletions

View File

@ -38,10 +38,6 @@ export class Signal extends JlGraphic {
constructor() {
super(Signal.Type);
this.codeGraph.draggable = true;
this.codeGraph.selectable = true;
this.codeGraph.rotatable = true;
this.codeGraph.eventMode = 'static';
this.addChild(this.codeGraph);
this.addChild(this.humanControl);
this.addChild(this.fleetMode);

View File

@ -84,10 +84,20 @@ export class signalInteraction extends GraphicInteractionPlugin<Signal> {
g.cursor = 'pointer';
g.scalable = true;
g.rotatable = true;
g.codeGraph.draggable = true;
g.codeGraph.selectable = true;
g.codeGraph.rotatable = true;
g.codeGraph.scalable = true;
g.codeGraph.eventMode = 'static';
}
unbind(g: Signal): void {
g.eventMode = 'none';
g.scalable = false;
g.rotatable = false;
g.codeGraph.draggable = false;
g.codeGraph.selectable = false;
g.codeGraph.rotatable = false;
g.codeGraph.scalable = false;
g.codeGraph.eventMode = 'none';
}
}