From 7123bfecd3ba460d5ee0b3c7d0a79bc1dd8bdf1f Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 19 Dec 2017 16:21:14 -0800 Subject: [PATCH] removing cancel animation stuff --- sim/visuals/nodes/largeMotorView.ts | 3 --- sim/visuals/nodes/mediumMotorView.ts | 3 --- 2 files changed, 6 deletions(-) diff --git a/sim/visuals/nodes/largeMotorView.ts b/sim/visuals/nodes/largeMotorView.ts index a81886dc..42aeb2e8 100644 --- a/sim/visuals/nodes/largeMotorView.ts +++ b/sim/visuals/nodes/largeMotorView.ts @@ -5,8 +5,6 @@ namespace pxsim.visuals { private static ROTATING_ECLIPSE_ID = "1eb2ae58-2419-47d4-86bf-4f26a7f0cf61"; - private lastMotorAnimationId: any; - constructor(port: number) { super(LARGE_MOTOR_SVG, "large-motor", NodeType.LargeMotor, port); } @@ -15,7 +13,6 @@ namespace pxsim.visuals { const motorState = ev3board().getMotors()[this.port]; if (!motorState) return; const speed = motorState.getSpeed(); - if (this.lastMotorAnimationId) cancelAnimationFrame(this.lastMotorAnimationId); if (!speed) return; this.setMotorAngle(motorState.getAngle()); diff --git a/sim/visuals/nodes/mediumMotorView.ts b/sim/visuals/nodes/mediumMotorView.ts index 09d0e5a0..546b7e4a 100644 --- a/sim/visuals/nodes/mediumMotorView.ts +++ b/sim/visuals/nodes/mediumMotorView.ts @@ -11,8 +11,6 @@ namespace pxsim.visuals { private hasPreviousAngle: boolean; private previousAngle: number; - private lastMotorAnimationId: any; - constructor(port: number) { super(MEDIUM_MOTOR_SVG, "medium-motor", NodeType.MediumMotor, port); } @@ -25,7 +23,6 @@ namespace pxsim.visuals { const motorState = ev3board().getMotors()[this.port]; if (!motorState) return; const speed = motorState.getSpeed(); - if (this.lastMotorAnimationId) cancelAnimationFrame(this.lastMotorAnimationId); if (!speed) return; this.setMotorAngle(motorState.getAngle());