aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-05-25 11:02:41 -0400
committerbobzel <zzzman@gmail.com>2023-05-25 11:02:41 -0400
commit3d30bdaf6dcf4972593f10b9b0f2fabd79c7062b (patch)
tree0de11409a12a9a7fcbf50833ec66683ab95f596b
parent55f3c138354101664df80b1ce48416de6adf2da0 (diff)
fixed phys scrolling
-rw-r--r--src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx
index be8dbbd40..cd1ff17dd 100644
--- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx
+++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx
@@ -920,7 +920,10 @@ export class PhysicsSimulationBox extends ViewBoxAnnotatableComponent<FieldViewP
</div>
</div>
</div>
- <div className="mechanicsSimulationEquationContainer" style={{ overflow: 'auto', height: `${(1000 / this.props.PanelWidth()) * 100}%`, transform: `scale(${this.props.PanelWidth() / 1000})` }}>
+ <div
+ className="mechanicsSimulationEquationContainer"
+ onWheel={e => this.props.isContentActive() && e.stopPropagation()}
+ style={{ overflow: 'auto', height: `${Math.max(1, 800 / this.props.PanelWidth()) * 100}%`, transform: `scale(${Math.min(1, this.props.PanelWidth() / 850)})` }}>
<div className="mechanicsSimulationControls">
<Stack direction="row" spacing={1}>
{this.dataDoc.simulation_paused && this.simulationMode != 'Tutorial' && (