From f363260bd8857834176fb5bba215fe5218ec8d87 Mon Sep 17 00:00:00 2001 From: brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> Date: Tue, 2 May 2023 15:27:42 -0400 Subject: debugging --- src/client/documents/Documents.ts | 2 +- .../nodes/PhysicsBox/PhysicsSimulationBox.tsx | 26 ++++++++++++++-------- .../nodes/PhysicsBox/PhysicsSimulationWeight.tsx | 3 --- 3 files changed, 18 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 0f3d5867e..13d0f41a9 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -661,7 +661,7 @@ export namespace Docs { DocumentType.SIMULATION, { layout: { view: PhysicsSimulationBox, dataField: defaultDataKey }, - options: { _height: 500 } + options: { _height: 100 } } ] ]); diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx index 21cef297a..691f1145c 100644 --- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationBox.tsx @@ -113,9 +113,11 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent @@ -2503,7 +2511,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx index 013b1bb5b..ab7ae8450 100644 --- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWeight.tsx @@ -895,7 +895,6 @@ export default class Weight extends React.Component { className="weightContainer" onPointerDown={(e) => { if (this.draggable) { - e.preventDefault(); this.props.dataDoc['paused'] = true; this.setState({dragging: true}); this.setState({clickPositionX: e.clientX}); @@ -903,7 +902,6 @@ export default class Weight extends React.Component { } }} onPointerMove={(e) => { - e.preventDefault(); if (this.state.dragging) { let newY = this.state.yPosition + e.clientY - this.state.clickPositionY; if (newY > this.props.yMax - 2 * this.props.radius - 10) { @@ -946,7 +944,6 @@ export default class Weight extends React.Component { }} onPointerUp={(e) => { if (this.state.dragging) { - e.preventDefault(); if ( this.props.dataDoc['simulationType'] != "Pendulum" && this.props.dataDoc['simulationType'] != "Suspension" -- cgit v1.2.3-70-g09d2