!700 优化排钻区间判断,移动文件,保存目录,值校验等

pull/700/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent 663124244a
commit a99f355959

@ -71,7 +71,7 @@ export class DrawDrillingTool extends Singleton
{
let startDist = rule.startDist;
let endDist = rule.endDist;
if (length + 1e-6 < endDist && length + 1e-6 >= startDist)
if (length < endDist + 1e-6 && length > startDist + 1e-6)
retRules.push(rule);
}
this._configCache.set(key, retRules.slice());

@ -15,7 +15,7 @@ import { commandMachine } from "../../../Editor/CommandMachine";
import { JigUtils } from "../../../Editor/JigUtils";
import { SelectBox, SelectType } from "../../../Editor/SelectBox";
import { MoveMatrix, AsVector2 } from "../../../Geometry/GeUtils";
import { BoardConfigOption, BoardProcessOption, FaceDirection, IGrooveOption } from '../../Store/BoardInterface';
import { BoardConfigOption, BoardProcessOption, FaceDirection, IGrooveOption, IUiOption } from '../../Store/BoardInterface';
import { RightPanelStore } from "../../Store/RightPanelStore/RightPanelStore";
import { BoardTypeComponent, ItemName, SetBoardDataBlock } from "./BoardCommon";
import { RightTabId } from "../RightPanel/RightPanel";
@ -46,7 +46,7 @@ export class BoardConfigModal extends React.Component<BoardConfigProps, {}>{
private rotatePars = [
["rotateX", "旋转X"], ["rotateY", "旋转Y"], ["rotateZ", "旋转Z"]
];
@observable showData;
@observable showData: IUiOption<BoardConfigOption>;
constructor(props)
{
super(props);

@ -1,4 +1,4 @@
import { Button, Classes, HTMLSelect, Icon } from '@blueprintjs/core';
import { Button, Classes, HTMLSelect, Icon, Intent } from '@blueprintjs/core';
import { observable, toJS } from 'mobx';
import * as React from 'react';
import { Math } from 'three';
@ -90,9 +90,12 @@ export class BoardOptionModal extends React.Component<{ board: Board; }, {}>
};
handleComfirmOption = () =>
{
if (CheckoutValid.HasInvailValue(this.m_ConfigOption, CheckObjectType.BR))
if (CheckoutValid.HasInvailValue(this.m_ConfigOption, CheckObjectType.BR)
|| CheckoutValid.HasInvailValue(this.m_ProcessOption, CheckObjectType.BR)
|| CheckoutValid.HasInvailValue(this.m_GrooveOption, CheckObjectType.BR)
)
{
AppToaster.show({ message: "存在无效数值,请修正", timeout: 1000 });
AppToaster.show({ message: "存在无效数值,请修正", timeout: 2000, intent: Intent.DANGER });
return;
}

@ -223,7 +223,7 @@ class RectanArray extends React.Component<{ store: ArrayStore; }, {}>
type={CheckObjectType.AR}
optKey="arrayAngle"
option={arOpt}
// uiOption={uiOption}
uiOption={uiOption}
onBlur={() => this.handleOnBlur()}
/>
<span>

@ -70,7 +70,15 @@ export class SaveAsModal extends React.Component<ISaveAsProps, { nodes: ITreeNod
//分析目录转换为ui节点数
private parseNodes = (dirs: any) =>
{
let newNodes: ITreeNode[] = [];
let childNodes: ITreeNode[] = [];
let newNodes: ITreeNode[] = [{
id: DirectoryId.FileDir,
label: "文件根目录",
icon: "folder-close",
hasCaret: dirs.length > 0,
isExpanded: true,
childNodes
}];
for (let dir of dirs)
{
if (dir.if_edit === "0") continue;
@ -81,7 +89,7 @@ export class SaveAsModal extends React.Component<ISaveAsProps, { nodes: ITreeNod
hasCaret: dir.childs.length > 0,
childNodes: this.parseNodes(dir.childs),
};
newNodes.push(node);
childNodes.push(node);
}
return newNodes;
};

@ -583,6 +583,11 @@ export class CommonPanel extends React.Component<ICommonPanelProps, ICommonPanel
targetId = arrayLast(Array.from(el.classList));
break;
}
else if (el.classList.contains("bp3-tree"))
{
targetId = this.props.defaultDirId;
break;
}
else
el = el.parentElement;
if (el === null || el === this.tree)

@ -46,7 +46,15 @@ export class TemplateSaveDir extends React.Component<ITemplateSaveDirProps, { no
//分析目录转换为ui节点数
private parseNodes = (dirs: any) =>
{
let newNodes: ITreeNode[] = [];
let childNodes: ITreeNode[] = [];
let newNodes: ITreeNode[] = [{
id: DirectoryId.TemplateDir,
label: "文件根目录",
icon: "folder-close",
hasCaret: dirs.length > 0,
isExpanded: true,
childNodes
}];
for (let dir of dirs)
{
if (dir.if_edit === "0") continue;
@ -57,7 +65,7 @@ export class TemplateSaveDir extends React.Component<ITemplateSaveDirProps, { no
hasCaret: dir.childs.length > 0,
childNodes: this.parseNodes(dir.childs),
};
newNodes.push(node);
childNodes.push(node);
}
return newNodes;
};

@ -345,14 +345,8 @@ export class LayerBoardStore extends BoardStore
}
HasInvailValue()
{
return super.HasInvailValue() || !Object.keys(this.layerNailOption).every(k =>
{
let v = this.layerNailOption[k];
return CheckoutValid.CheckoutBoardOption(k, v) === "";
});
return super.HasInvailValue() || CheckoutValid.HasInvailValue(this.uiLayerNailOption, CheckObjectType.BR);
}
}
export class VerticalBoardStore extends BoardStore

Loading…
Cancel
Save