diff --git a/src/Add-on/DrawBoard/DrawBehindBoard.ts b/src/Add-on/DrawBoard/DrawBehindBoard.ts
index caad8cf28..b5e07a9f1 100644
--- a/src/Add-on/DrawBoard/DrawBehindBoard.ts
+++ b/src/Add-on/DrawBoard/DrawBehindBoard.ts
@@ -23,7 +23,7 @@ export class DrawBehindBoard extends DrawSingleBoard
//获取背板高度
let size = newBox.getSize(new Vector3());
- let height = opt.isTotalHeight ? size.z : parseFloat(opt.height) / 100;
+ let height = opt.height === "H" ? size.z : parseFloat(opt.height) / 100;
let moveDist = parseFloat(opt.moveDist) / 100;
//判断背板位置,更新背板高度
diff --git a/src/UI/Components/Board/BehindBoardModal.tsx b/src/UI/Components/Board/BehindBoardModal.tsx
index 28734a727..a1fd6ba9c 100644
--- a/src/UI/Components/Board/BehindBoardModal.tsx
+++ b/src/UI/Components/Board/BehindBoardModal.tsx
@@ -2,21 +2,21 @@ import { inject, observer } from 'mobx-react';
import * as React from 'react';
import { Radio, RadioGroup, Checkbox } from '../../../../node_modules/@blueprintjs/core';
import { BehindBoardStore, BehindHeightPositon, BehindRelativePositon } from '../../Store/BoardStore';
-import { SetBoardDataItem, SetBoardDataItem2, BoardModel } from './BoardCommon';
+import { SetBoardDataItem, SetBoardDataItem2, BoardModel, SetBoardDataBlock } from './BoardCommon';
import { observable } from '../../../../node_modules/mobx';
@inject("store")
@observer
export class BehindBoardModal extends React.Component<{ store?: BehindBoardStore }, {}>
{
- m_ScaleParameter = new Map([
+ private m_ScaleParameter = new Map([
["knifeRad", "刀具半径"],
["grooveAddLength", "槽加长"], ["grooveAddWidth", "槽加宽"], ["grooveAddDepth", "槽加深"]
]);
- m_PosParameter = new Map([
+ private m_ResPosParameter = new Map([
["spaceWidth", "空间"], ["count", "板数"], ["thickness", "板度"]
]);
- @observable moveDir = "移动";
+ @observable private moveDir = "移动";
constructor(props)
{
super(props);
@@ -36,38 +36,22 @@ export class BehindBoardModal extends React.Component<{ store?: BehindBoardStore
加工数据
-
- {
- Array.from(this.m_ScaleParameter.keys()).map(k =>
- {
- return (
-
- {this.m_ScaleParameter.get(k)}:
-
- {
- store.m_BoardOption[k] = e.target.value;
- }}
- dir="auto" />
-
- )
- })
- }
-
+
@@ -80,14 +64,17 @@ export class BehindBoardModal extends React.Component<{ store?: BehindBoardStore
let value = e.currentTarget.value as BehindHeightPositon
store.m_BoardOption.boardPosition = value;
if (value === BehindHeightPositon.ForTop)
- this.moveDir = "上移"
+ {
+ this.moveDir = "上移";
+ store.m_BoardOption.height = "0"
+ }
else if (value === BehindHeightPositon.ForBottom)
- this.moveDir = "下移"
- else
{
- store.m_BoardOption.height = "H"
- store.m_BoardOption.isTotalHeight = true;
+ store.m_BoardOption.height = "0"
+ this.moveDir = "下移";
}
+ else
+ store.m_BoardOption.height = "H"
}}
selectedValue={store.m_BoardOption.boardPosition}
@@ -99,13 +86,13 @@ export class BehindBoardModal extends React.Component<{ store?: BehindBoardStore
@@ -127,22 +114,11 @@ export class BehindBoardModal extends React.Component<{ store?: BehindBoardStore
-
- {
- Array.from(this.m_PosParameter.keys()).map(k =>
- {
- return (
-
- )
- })
- }
-
+
diff --git a/src/UI/Components/Board/BoardCommon.tsx b/src/UI/Components/Board/BoardCommon.tsx
index 644bface1..0ab1a7251 100644
--- a/src/UI/Components/Board/BoardCommon.tsx
+++ b/src/UI/Components/Board/BoardCommon.tsx
@@ -2,38 +2,53 @@ import { observer } from 'mobx-react';
import * as React from 'react';
//设置板件数据组件
-export const SetBoardDataItem = observer(({ k, behindBoardOption, title, isDisabled = false }) =>
+export const SetBoardDataItem = observer(({ k, opt, title, isDisabled = false }) =>
{title}:
{
- behindBoardOption[k] = e.target.value;
+ opt[k] = e.target.value;
}}
/>
);
//设置板件数据组件
-export const SetBoardDataItem2 = observer(({ k, m_BoardOption, title }) =>
+export const SetBoardDataItem2 = observer(({ k, opt, title }) =>
);
+export const SetBoardDataBlock = observer(({ pars, opt, className }) =>
+
+ {
+ Array.from(pars.keys()).map(k =>
+
+ )
+ }
+
+);
+
export const BoardModel = () =>
{
return (
diff --git a/src/UI/Components/Board/BoardModal.tsx b/src/UI/Components/Board/BoardModal.tsx
index 6bf3be6ee..6f521359d 100644
--- a/src/UI/Components/Board/BoardModal.tsx
+++ b/src/UI/Components/Board/BoardModal.tsx
@@ -32,37 +32,34 @@ interface BoardModalProps
store: BoardStore
}
-export class BoardModal extends React.Component {
- private m_ModalMap: Map;
- constructor(props)
- {
- super(props);
- let store = this.props.store;
- this.m_ModalMap = new Map([
- [BoardModalType.LR, ],
- [BoardModalType.TB, ],
- [BoardModalType.Be, ],
- [BoardModalType.Ly, ],
- [BoardModalType.Ve, ],
- ])
- }
- render()
- {
- let store = this.props.store;
- return (
-