|
|
|
@ -3,11 +3,14 @@ import { IconNames } from '@blueprintjs/icons';
|
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
|
import * as React from 'react';
|
|
|
|
|
import * as xaop from 'xaop';
|
|
|
|
|
import { ExtendsbrThick2 } from '../../../Add-on/DrawBoard/BuildBoardTool';
|
|
|
|
|
import { app } from '../../../ApplicationServices/Application';
|
|
|
|
|
import { CheckObjectType } from '../../../Common/CheckoutVaildValue';
|
|
|
|
|
import { safeEval } from '../../../Common/eval';
|
|
|
|
|
import { KeyBoard } from '../../../Common/KeyEnum';
|
|
|
|
|
import { FixedNotZero } from '../../../Common/Utils';
|
|
|
|
|
import { TemplateParam } from '../../../DatabaseServices/Template/Param/TemplateParam';
|
|
|
|
|
import { TemplateParamType } from '../../../DatabaseServices/Template/Param/TemplateParamType';
|
|
|
|
|
import { commandMachine, CommandWrap } from '../../../Editor/CommandMachine';
|
|
|
|
|
import { userConfig } from '../../../Editor/UserConfig';
|
|
|
|
|
import { EFullDir, EFullType, EWineRackType, EWRackArrayType } from '../../Store/WineRackInterface';
|
|
|
|
@ -18,6 +21,9 @@ import { AppToaster, ToasterValueError } from '../Toaster';
|
|
|
|
|
import { Input5Or4Component, SetBoardDataBlock, SetBoardDataItem } from './BoardCommon';
|
|
|
|
|
import { BoardModalType } from './BoardModal';
|
|
|
|
|
|
|
|
|
|
const titleLenght: React.CSSProperties = {
|
|
|
|
|
width: "3.5rem"
|
|
|
|
|
};
|
|
|
|
|
@observer
|
|
|
|
|
export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {}>
|
|
|
|
|
{
|
|
|
|
@ -49,7 +55,17 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
|
|
|
|
|
await CommandWrap(async () =>
|
|
|
|
|
{
|
|
|
|
|
let temp = this.props.store.EditorTemplate;
|
|
|
|
|
if (!temp.GetParam("BH2"))
|
|
|
|
|
{
|
|
|
|
|
let bh2 = new TemplateParam();
|
|
|
|
|
bh2.name = "BH2";
|
|
|
|
|
bh2.description = "补板厚";
|
|
|
|
|
bh2.type = TemplateParamType.Float;
|
|
|
|
|
bh2.value = 0;
|
|
|
|
|
temp.Params.push(bh2);
|
|
|
|
|
}
|
|
|
|
|
temp.Option = opt;
|
|
|
|
|
ExtendsbrThick2(temp);
|
|
|
|
|
await temp.UpdateTemplateTree();
|
|
|
|
|
app.Editor.UpdateScreen();
|
|
|
|
|
this.props.store.EditorTemplate = undefined;
|
|
|
|
@ -340,13 +356,25 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<H5>补板</H5>
|
|
|
|
|
<SetBoardDataItem
|
|
|
|
|
type={CheckObjectType.WR}
|
|
|
|
|
optKey="brThick2"
|
|
|
|
|
option={m_Option}
|
|
|
|
|
uiOption={UIOption}
|
|
|
|
|
title="补板厚"
|
|
|
|
|
/>
|
|
|
|
|
<div style={{ display: "flex" }}>
|
|
|
|
|
<SetBoardDataItem
|
|
|
|
|
type={CheckObjectType.WR}
|
|
|
|
|
optKey="brThick2"
|
|
|
|
|
titleStyle={titleLenght}
|
|
|
|
|
option={m_Option}
|
|
|
|
|
uiOption={UIOption}
|
|
|
|
|
title="补板厚"
|
|
|
|
|
/>
|
|
|
|
|
<Checkbox
|
|
|
|
|
checked={m_Option.isExtendsBH2}
|
|
|
|
|
label="继承"
|
|
|
|
|
inline={true}
|
|
|
|
|
style={{ marginRight: 0, marginLeft: 3 }}
|
|
|
|
|
onChange={() =>
|
|
|
|
|
{
|
|
|
|
|
m_Option.isExtendsBH2 = !m_Option.isExtendsBH2;
|
|
|
|
|
}} />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Checkbox
|
|
|
|
|
checked={m_Option.isDrawLy}
|
|
|
|
|