Widget fixes (#316)
* Use bBox in motor slider * Use setRate instead of setAngle in gyro widget
This commit is contained in:
committed by
Sam El-Husseini
parent
d8589ea98c
commit
22ce840181
@ -76,7 +76,7 @@ namespace pxsim.visuals {
|
||||
let t = Math.max(0, Math.min(1, (width + bBox.left / this.scaleFactor - cur.x / this.scaleFactor) / width))
|
||||
|
||||
const state = this.state;
|
||||
state.setAngle((1 - t) * (100));
|
||||
state.setRate((1 - t) * (100));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user