!2572 优化:增加支持虚拟空间(透明块)选项

pull/2569/MERGE
钱若寒 8 months ago committed by ChenX
parent 606eebc1d9
commit e7488b9322

@ -882,7 +882,7 @@ export const DefaultR2b2Option: IRect2Br2Option = {
Object.freeze(DefaultR2b2Option);
export const DefaultHSOption: IHSOption = {
version: 4,
version: 5,
isAll: true,
isHide: true,
isDelete: false,
@ -906,6 +906,7 @@ export const DefaultHSOption: IHSOption = {
hwComposity: false,
lattice: false,
dim: false,
visual:false,
curve: false,
line: false,
polyline: false,

@ -33,6 +33,7 @@ import { BoardModalType } from "../Board/BoardModalType";
import { Config_ModalType } from '../Board/UserConfigComponent';
import './HideSelectModal.less';
import { CommonModal } from './ModalContainer';
import { VisualSpaceBox } from '../../../Editor/VisualSpaceBox';
type AllString<T> = {
@ -61,6 +62,7 @@ export const KEY2LABEL: AllString<IHSOption> = {
hinge: "铰链",
hwComposity: "复合实体",
dim: "标注",
visual: "虚拟空间",
noChaiDan: "不拆单的板",
curve: "曲线",
line: "直线",
@ -85,7 +87,7 @@ const CURVE_KEYS = [
"curve", "line", "polyline", "circle", "arc"
];
const OTHERS = [
"dim"
"dim", "visual"
];
const KEYS: [string, string[]][] = [
["板件类", BOARD_KEYS], ["孔类", HOLE_KEYS], ["五金组件类", HW_KEYS], ["曲线类", CURVE_KEYS], ["其他", OTHERS]
@ -616,6 +618,11 @@ export class HideSelectModal extends React.Component<{ store: HideSelectStore; h
if (option.dim)
resEntSet.add(e);
}
if (e instanceof VisualSpaceBox)
{
if (option.visual)
resEntSet.add(e);
}
}
return resEntSet;

@ -34,4 +34,5 @@ export interface IHSOption extends IBaseOption
noChaiDan: boolean; //不拆单板件
matchType?: ECompareType;
customBoardName?: string;
visual?: boolean;
}

@ -55,6 +55,10 @@ export class HideSelectStore implements IConfigStore
cof.option.version = 4;
cof.option.noChaiDan = false;
}
if(cof.option.version < 5){
cof.option.version = 5;
cof.option.visual = false;
}
Object.assign(this.m_Option, cof.option);
this.CheckIsAll();

Loading…
Cancel
Save