aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-12-21 14:55:48 -0500
committerbobzel <zzzman@gmail.com>2023-12-21 14:55:48 -0500
commit1caba64ee0f32ee8af79263cd4ef2a8bc5d5146e (patch)
tree0fa0e957d1f342fdc6ed4a4b43f5dddfddb1298a /src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx
parent02eb7da95df283606d4275a22d9451cef371c3b5 (diff)
parent2691b951d96f2ce7652acbea9e340b61737b3b57 (diff)
Merge branch 'moreUpgrading' into dataViz-annotations
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx')
-rw-r--r--src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx
index 8cc1d0fbf..696352296 100644
--- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx
+++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationWall.tsx
@@ -1,34 +1,33 @@
-import React = require('react');
+import * as React from 'react';
export interface Force {
- magnitude: number;
- directionInDegrees: number;
+ magnitude: number;
+ directionInDegrees: number;
}
export interface IWallProps {
- length: number;
- xPos: number;
- yPos: number;
- angleInDegrees: number;
+ length: number;
+ xPos: number;
+ yPos: number;
+ angleInDegrees: number;
}
export default class Wall extends React.Component<IWallProps> {
+ constructor(props: any) {
+ super(props);
+ }
- constructor(props: any) {
- super(props)
- }
+ wallStyle = {
+ width: this.props.angleInDegrees == 0 ? this.props.length + '%' : '5px',
+ height: this.props.angleInDegrees == 0 ? '5px' : this.props.length + '%',
+ position: 'absolute' as 'absolute',
+ left: this.props.xPos + '%',
+ top: this.props.yPos + '%',
+ backgroundColor: '#6c7b8b',
+ margin: 0,
+ padding: 0,
+ };
- wallStyle = {
- width: this.props.angleInDegrees == 0 ? this.props.length + "%" : "5px",
- height: this.props.angleInDegrees == 0 ? "5px" : this.props.length + "%",
- position: "absolute" as "absolute",
- left: this.props.xPos + "%",
- top: this.props.yPos + "%",
- backgroundColor: "#6c7b8b",
- margin: 0,
- padding: 0,
- };
-
- render () {
- return (<div style={this.wallStyle}></div>);
- }
-};
+ render() {
+ return <div style={this.wallStyle}></div>;
+ }
+}