aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx')
-rw-r--r--src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
index ab7ae8450..a5bd5a04e 100644
--- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
+++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx
@@ -235,7 +235,7 @@ export default class Weight extends React.Component<IWeightProps, IState> {
this.setDisplayValues();
}
- // Make sure weight doesn't go above max height
+ // Make sure weight doesn't go above max height
if (prevState.updatedStartPosY != this.state.updatedStartPosY || prevProps.startVelY != this.props.startVelY) {
if (this.props.dataDoc['simulationType'] == "One Weight") {
let maxYPos = this.state.updatedStartPosY;
@@ -401,7 +401,7 @@ export default class Weight extends React.Component<IWeightProps, IState> {
w.push({ length: 70, xPos: 0, yPos: 0, angleInDegrees: 0 });
w.push({ length: 70, xPos: 0, yPos: 80, angleInDegrees: 0 });
w.push({ length: 80, xPos: 0, yPos: 0, angleInDegrees: 90 });
- w.push({ length: 80, xPos: 69.5, yPos: 0, angleInDegrees: 90 });
+ w.push({ length: 85, xPos: 69.5, yPos: 0, angleInDegrees: 90 });
}
this.setState({walls: w})
}
@@ -415,14 +415,14 @@ export default class Weight extends React.Component<IWeightProps, IState> {
}
}
- // Update y position when start pos y changes
- if (prevProps.startPosY != this.props.startPosY) {
- if (this.props.paused) {
- // this.setState({yPosition: this.props.startPosY})
- // this.setState({updatedStartPosY: this.props.startPosY})
- this.props.dataDoc['positionYDisplay'] = this.props.startPosY
- }
- }
+ // Update y position when start pos y changes TODO debug
+ // if (prevProps.startPosY != this.props.startPosY) {
+ // if (this.props.paused) {
+ // this.setState({yPosition: this.props.startPosY})
+ // this.setState({updatedStartPosY: this.props.startPosY})
+ // this.props.dataDoc['positionYDisplay'] = this.getDisplayYPos(this.props.startPosY)
+ // }
+ // }
// Update wedge coordinates
if (prevProps.wedgeWidth != this.props.wedgeWidth || prevProps.wedgeHeight != this.props.wedgeHeight) {
@@ -1276,7 +1276,7 @@ export default class Weight extends React.Component<IWeightProps, IState> {
position: "absolute",
zIndex: 500,
left: Math.round(this.props.xMax * 0.5 - 200 + this.props.wedgeWidth - 80) + "px",
- top: Math.round(this.yMax - 40) + "px",
+ top: Math.round(this.props.yMax - 40) + "px",
}}
>
{Math.round(