diff options
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") { |