|
|
|
@ -4,12 +4,12 @@ import { observer } from "mobx-react";
|
|
|
|
|
import React from "react";
|
|
|
|
|
import { MathUtils, Matrix4, Vector3 } from "three";
|
|
|
|
|
import { app } from "../../../../ApplicationServices/Application";
|
|
|
|
|
import { safeEval } from "../../../../Common/eval";
|
|
|
|
|
import { KeyBoard } from "../../../../Common/KeyEnum";
|
|
|
|
|
import { MakeRotateMatrix4 } from "../../../../Common/Matrix4Utils";
|
|
|
|
|
import { FixedNotZero } from "../../../../Common/Utils";
|
|
|
|
|
import { safeEval } from "../../../../Common/eval";
|
|
|
|
|
import { Entity } from "../../../../DatabaseServices/Entity/Entity";
|
|
|
|
|
import { commandMachine, CommandWrap } from "../../../../Editor/CommandMachine";
|
|
|
|
|
import { CommandWrap, commandMachine } from "../../../../Editor/CommandMachine";
|
|
|
|
|
import { CommandState } from "../../../../Editor/CommandState";
|
|
|
|
|
import { AxisType } from "../../../../Editor/TranstrolControl/CoorAxes";
|
|
|
|
|
import { AppToaster } from "../../Toaster";
|
|
|
|
@ -33,7 +33,7 @@ export class SizeComponent extends React.Component<SizeComponentProps>
|
|
|
|
|
this.disposeAutorun = autorun(() =>
|
|
|
|
|
{
|
|
|
|
|
if (this.sizeRef.current)
|
|
|
|
|
this.sizeRef.current.inputElement.value = this.props.store[this.props.sizeKey].toFixed(0);
|
|
|
|
|
this.sizeRef.current.inputElement.value = this.props.store[this.props.sizeKey].toFixed(3);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -51,7 +51,7 @@ export class SizeComponent extends React.Component<SizeComponentProps>
|
|
|
|
|
let value = safeEval(this.sizeRef.current.inputElement.value);
|
|
|
|
|
if (isNaN(value) && this.sizeRef.current)
|
|
|
|
|
{
|
|
|
|
|
this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(0);
|
|
|
|
|
this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(3);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -110,7 +110,7 @@ export class SizeComponent extends React.Component<SizeComponentProps>
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
<NumericInput
|
|
|
|
|
defaultValue={MathUtils.clamp(store[this.props.sizeKey], 0, Number.MAX_VALUE).toFixed(0)}
|
|
|
|
|
defaultValue={MathUtils.clamp(store[this.props.sizeKey], 0, Number.MAX_VALUE).toFixed(3)}
|
|
|
|
|
ref={this.sizeRef}
|
|
|
|
|
onKeyDown={(e) =>
|
|
|
|
|
{
|
|
|
|
@ -121,7 +121,7 @@ export class SizeComponent extends React.Component<SizeComponentProps>
|
|
|
|
|
}
|
|
|
|
|
if (e.keyCode === KeyBoard.Escape)
|
|
|
|
|
{
|
|
|
|
|
this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(0);
|
|
|
|
|
this.sizeRef.current.inputElement.value = store[this.props.sizeKey].toFixed(3);
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
onBlur={() => { this.ChangeModuleSize(); }}
|
|
|
|
|