|
|
|
@ -264,9 +264,20 @@ export default class TemplateParamList extends React.Component<ITemplateParamLis
|
|
|
|
|
{
|
|
|
|
|
let dist = distRes.Distance;
|
|
|
|
|
const store = this.props.store;
|
|
|
|
|
store.params[store.currentParamIndex].value = dist.toFixed(2);
|
|
|
|
|
store.Template.Params[store.currentParamIndex].value = parseFloat(dist.toFixed(2));
|
|
|
|
|
await store.Template.UpdateTemplateTree();
|
|
|
|
|
let param = store.params[store.currentParamIndex];
|
|
|
|
|
param.value = dist.toFixed(2);
|
|
|
|
|
let tParam = store.Template.GetParam(param.name);
|
|
|
|
|
if (tParam)
|
|
|
|
|
{
|
|
|
|
|
tParam.value = parseFloat(param.value);
|
|
|
|
|
await store.Template.UpdateTemplateTree();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
message: "程序错误:无法找到该变量!",
|
|
|
|
|
timeout: 3000,
|
|
|
|
|
intent: Intent.DANGER
|
|
|
|
|
}, "errorval");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
private setCoordinate = async () =>
|
|
|
|
|