Remove synced motor label when motors are no longer in sync (#189)
This commit is contained in:
		
				
					committed by
					
						
						Peli de Halleux
					
				
			
			
				
	
			
			
			
						parent
						
							2d3ea5631a
						
					
				
				
					commit
					76ff39605a
				
			@@ -19,7 +19,11 @@ namespace pxsim.visuals {
 | 
			
		||||
            const syncedMotor = motorState.getSynchedMotor();
 | 
			
		||||
            if ((syncedMotor || this.syncedMotor) && syncedMotor != this.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);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user