diff options
author | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-04 21:16:36 -0400 |
---|---|---|
committer | brynnchernosky <56202540+brynnchernosky@users.noreply.github.com> | 2023-05-04 21:16:36 -0400 |
commit | 09f61f8d1e10de81f6f5d18ff372744715aa62c4 (patch) | |
tree | e3dc599c839b0775e00f1775404992f76028fa01 /src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx | |
parent | 4626b8246c2bca4993d75673714daa27071b6538 (diff) |
debug wrong start values for input fields
Diffstat (limited to 'src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx')
-rw-r--r-- | src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx b/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx index 3386bfd1c..353b386a6 100644 --- a/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx +++ b/src/client/views/nodes/PhysicsBox/PhysicsSimulationInputField.tsx @@ -37,12 +37,15 @@ export default class InputField extends React.Component<IInputProps, IState> { tempRadianValue: this.props.mode != "Freeform" && !this.props.showIcon ? 0 : (Number(this.props.value) * Math.PI) / 180, width: this.props.small ? "6em" : "7em", margin: this.props.small ? "0px" : "10px" - } } epsilon: number = 0.01; + componentDidMount(): void { + this.setState({tempValue: Number(this.props.value)}) + } + componentDidUpdate(prevProps: Readonly<IInputProps>, prevState: Readonly<IState>, snapshot?: any): void { if (prevProps.value != this.props.value && !isNaN(this.props.value)) { if (this.props.mode == "Freeform") { |