From 0f03110bab8d4636d33abf7568bf7c6cb14847b4 Mon Sep 17 00:00:00 2001 From: brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> Date: Tue, 21 Feb 2023 16:10:23 -0500 Subject: settings menu --- src/client/views/nodes/PhysicsSimulationBox.scss | 17 +++++++---- src/client/views/nodes/PhysicsSimulationBox.tsx | 36 +++++++++++------------- 2 files changed, 28 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/PhysicsSimulationBox.scss b/src/client/views/nodes/PhysicsSimulationBox.scss index 9efe835a3..7573f1472 100644 --- a/src/client/views/nodes/PhysicsSimulationBox.scss +++ b/src/client/views/nodes/PhysicsSimulationBox.scss @@ -40,7 +40,7 @@ tr:nth-child(even) { } button { - z-index: 5000; + z-index: 50; } .angleLabel { @@ -54,14 +54,21 @@ button { width: 100%; height: 100%; font-size: 12px; - background-color: purple; + background-color: rgb(224, 224, 224); border-radius: 2px; border-color: black; border-style: solid; - z-index: 20000; + padding: 10px; + position: fixed; + z-index: 1000; } -.mechanicsSimulationSettingsMenuRow { +.mechanicsSimulationSettingsMenuColumn { + display: flex; + flex-direction: column; + width: 50%; +} + +.mechanicsSimulationSettingsMenuContents { 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 f0e009deb..7eb9092bf 100644 --- a/src/client/views/nodes/PhysicsSimulationBox.tsx +++ b/src/client/views/nodes/PhysicsSimulationBox.tsx @@ -361,16 +361,24 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponent {this.menuIsOpen && (
-
{this.menuIsOpen = false; this.dataDoc.simulationReset = !this.dataDoc.simulationReset;}} style={{zIndex: 20000}}> - +
{this.menuIsOpen = false; this.dataDoc.simulationReset = !this.dataDoc.simulationReset;}}> +
-

Simulation Settings

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

Elastic collisions

- {this.dataDoc.elasticCollisions = !this.dataDoc.elasticCollisions}}/> +

Simulation Settings

+
+
+

Show forces

+

Show acceleration

+

Show velocity

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

Elastic collisions

} +
+
+
{this.dataDoc.showForces = !this.dataDoc.showForces}}/>
+
{this.dataDoc.showAcceleration = !this.dataDoc.showAcceleration}}/>
+
{this.dataDoc.showVelocity = !this.dataDoc.showVelocity}}/>
+ {this.dataDoc.simulationType == "Free Weight" &&
{this.dataDoc.elasticCollisions = !this.dataDoc.elasticCollisions}}/>
}
- } +
{/* {this.dataDoc.simulationType == "Inclined Plane" &&

Inclined plane angle

@@ -383,18 +391,6 @@ export default class PhysicsSimulationBox extends ViewBoxAnnotatableComponentinput 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}}/> -
)}
-- cgit v1.2.3-70-g09d2