Remove synced motor label when motors are no longer in sync (#189)
This commit is contained in:
parent
2d3ea5631a
commit
76ff39605a
@ -19,7 +19,11 @@ namespace pxsim.visuals {
|
|||||||
const syncedMotor = motorState.getSynchedMotor();
|
const syncedMotor = motorState.getSynchedMotor();
|
||||||
if ((syncedMotor || this.syncedMotor) && syncedMotor != this.syncedMotor) {
|
if ((syncedMotor || this.syncedMotor) && syncedMotor != this.syncedMotor) {
|
||||||
this.syncedMotor = syncedMotor;
|
this.syncedMotor = syncedMotor;
|
||||||
this.showSyncedLabel(motorState, syncedMotor);
|
if (this.syncedMotor) {
|
||||||
|
this.showSyncedLabel(motorState, syncedMotor);
|
||||||
|
} else if (this.syncedLabelG) {
|
||||||
|
this.syncedLabelG.parentNode.removeChild(this.syncedLabelG);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user