From b8762e80e3fd6b1c78b62f6bd50acb2029a68f58 Mon Sep 17 00:00:00 2001 From: brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> Date: Mon, 20 Feb 2023 13:46:55 -0500 Subject: start sim settings menu --- src/client/views/nodes/PhysicsSimulationBox.scss | 16 +++++ src/client/views/nodes/PhysicsSimulationBox.tsx | 73 +++++++++++++++++++--- src/client/views/nodes/PhysicsSimulationWeight.tsx | 1 - 3 files changed, 80 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/PhysicsSimulationBox.scss b/src/client/views/nodes/PhysicsSimulationBox.scss index cfe2ee6ca..9efe835a3 100644 --- a/src/client/views/nodes/PhysicsSimulationBox.scss +++ b/src/client/views/nodes/PhysicsSimulationBox.scss @@ -49,3 +49,19 @@ button { user-select: none; pointer-events: none; } + +.mechanicsSimulationSettingsMenu { + width: 100%; + height: 100%; + font-size: 12px; + background-color: purple; + border-radius: 2px; + border-color: black; + border-style: solid; + z-index: 20000; +} + +.mechanicsSimulationSettingsMenuRow { + display: flex; + z-index: 20000; +} \ No newline at end of file diff --git a/src/client/views/nodes/PhysicsSimulationBox.tsx b/src/client/views/nodes/PhysicsSimulationBox.tsx index 0f2bc43a0..b7f4ed0fb 100644 --- a/src/client/views/nodes/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsSimulationBox.tsx @@ -7,8 +7,8 @@ import "./PhysicsSimulationBox.scss"; import Weight from "./PhysicsSimulationWeight"; import Wall from "./PhysicsSimulationWall" import Wedge from "./PhysicsSimulationWedge" -import { isUndefined } from "lodash"; - +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { CheckBox } from "../search/CheckBox"; export interface IForce { description: string; magnitude: number; @@ -53,6 +53,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent )} -
- {/* {this.dataDoc.wallPositions && ( - {this.dataDoc.wallPositions.map((element: { length: number; xPos: number; yPos: number; angleInDegrees: number; }, index: React.Key | null | undefined) => { + {/*
+ {this.dataDoc.wallPositions.map((element: { length: number; xPos: number; yPos: number; angleInDegrees: number; }, index: React.Key | null | undefined) => { return (
); })} - )} */} -
+
*/}
+
+ {this.menuIsOpen && ( +
+
{this.menuIsOpen = false}}> + +
+

Simulation Settings

+ {this.dataDoc.simulationType == "Free Weight" && +
+

Elastic collisions

+ {this.dataDoc.elasticCollisions = val}} originalStatus={this.dataDoc.elasticCollisions} /> +
+ } + {/* {this.dataDoc.simulationType == "Inclined Plane" && +
+

Inclined plane angle

+

input field!

+
+ } + {this.dataDoc.simulationType == "Pendulum" && +
+

Pendulum angle

+

input field!

+
+ } +
+

Show forces

+ + this.dataDoc.showForces = !this.dataDoc.showForces + } + /> +
+
+

Show acceleration

+ + this.dataDoc.showAcceleration = !this.dataDoc.showAcceleration + } + /> +
+
+

Show velocity

+ + this.dataDoc.showVelocity = !this.dataDoc.showVelocity + } + /> +
*/} +
+ )} +
@@ -395,6 +449,7 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponentTYPE)} +
diff --git a/src/client/views/nodes/PhysicsSimulationWeight.tsx b/src/client/views/nodes/PhysicsSimulationWeight.tsx index 7c26334bf..b9fa14df0 100644 --- a/src/client/views/nodes/PhysicsSimulationWeight.tsx +++ b/src/client/views/nodes/PhysicsSimulationWeight.tsx @@ -840,7 +840,6 @@ export default class Weight extends React.Component { position: "absolute", left: labelLeft + "px", top: labelTop + "px", - // zIndex: -1, lineHeight: 0.5, backgroundColor: this.labelBackgroundColor, }} -- cgit v1.2.3-70-g09d2