|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import React = require("react");
|
|
|
|
|
import { Card, Checkbox, Classes, HTMLSelect, Intent, Label, Slider, Tooltip } from "@blueprintjs/core";
|
|
|
|
|
import { Card, Checkbox, Classes, HTMLSelect, InputGroup, Intent, Label, Popover, PopoverPosition, Slider, Tooltip } from "@blueprintjs/core";
|
|
|
|
|
import { observable } from "mobx";
|
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
import { ColorResult, SketchPicker } from "react-color";
|
|
|
|
@ -11,6 +11,7 @@ import { AAType, ViewDirType } from "../../../../Common/SystemEnum";
|
|
|
|
|
import { FixedNotZero } from "../../../../Common/Utils";
|
|
|
|
|
import { userConfig } from "../../../../Editor/UserConfig";
|
|
|
|
|
import { ConfigStore } from "./ConfigDialog";
|
|
|
|
|
import './ConfigPanelStyle.less';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const popover: React.CSSProperties = {
|
|
|
|
@ -284,6 +285,86 @@ export class DisplayConfigPanel extends React.Component<{ store: ConfigStore; }>
|
|
|
|
|
vertical={false}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div style={{ marginTop: "10px" }}>
|
|
|
|
|
<Checkbox style={{ color: 'rgb(96, 110, 122)' }} inline label="开启切换轴线"
|
|
|
|
|
checked={userConfig.isOpenAxisSwitch} onChange={(e) =>
|
|
|
|
|
{
|
|
|
|
|
userConfig.isOpenAxisSwitch = !userConfig.isOpenAxisSwitch;
|
|
|
|
|
}} />
|
|
|
|
|
<br />
|
|
|
|
|
<Checkbox style={{ color: 'rgb(96, 110, 122)' }} inline label="开启相机设置"
|
|
|
|
|
checked={userConfig.isOpenCameraSetting} onChange={async (e) =>
|
|
|
|
|
{
|
|
|
|
|
userConfig.isOpenCameraSetting = !userConfig.isOpenCameraSetting;
|
|
|
|
|
}} />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Checkbox style={{ color: 'rgb(96, 110, 122)' }} inline label="开启UCS网格" checked={userConfig.UCSGridConfig.isShowUCSGrid} onChange={async (e) =>
|
|
|
|
|
{
|
|
|
|
|
userConfig.UCSGridConfig.isShowUCSGrid = !userConfig.UCSGridConfig.isShowUCSGrid;
|
|
|
|
|
app.Editor.UcsServices.SettingGripHelper(userConfig.UCSGridConfig);
|
|
|
|
|
}} />
|
|
|
|
|
<div className="USCConfigPanel" style={{ display: userConfig.UCSGridConfig.isShowUCSGrid ? 'block' : 'none' }}>
|
|
|
|
|
<Label style={{ color: "#606E7A" }} className={Classes.INLINE} >
|
|
|
|
|
网格大小:
|
|
|
|
|
<InputGroup defaultValue={userConfig.UCSGridConfig.size.toString()}
|
|
|
|
|
onBlur={(e) =>
|
|
|
|
|
{
|
|
|
|
|
if (Number.isNaN(Number(e.target.value))) return;
|
|
|
|
|
userConfig.UCSGridConfig.size = Number(e.target.value);
|
|
|
|
|
}} />
|
|
|
|
|
</Label>
|
|
|
|
|
<Label style={{ color: "#606E7A" }} className={Classes.INLINE} >
|
|
|
|
|
网格密度:
|
|
|
|
|
<InputGroup defaultValue={userConfig.UCSGridConfig.divisions.toString()}
|
|
|
|
|
onBlur={(e) =>
|
|
|
|
|
{
|
|
|
|
|
if (Number.isNaN(Number(e.target.value))) return;
|
|
|
|
|
userConfig.UCSGridConfig.divisions = Number(e.target.value);
|
|
|
|
|
}} />
|
|
|
|
|
</Label>
|
|
|
|
|
<Label style={{ color: "#606E7A" }} className={Classes.INLINE} >
|
|
|
|
|
外线颜色:
|
|
|
|
|
<Popover
|
|
|
|
|
position={PopoverPosition.BOTTOM}
|
|
|
|
|
minimal
|
|
|
|
|
className="bp3-input-group"
|
|
|
|
|
content={
|
|
|
|
|
<SketchPicker
|
|
|
|
|
color={userConfig.UCSGridConfig.color1}
|
|
|
|
|
onChange={async (e: ColorResult) =>
|
|
|
|
|
{
|
|
|
|
|
userConfig.UCSGridConfig.color1 = e.hex;
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
}>
|
|
|
|
|
<InputGroup
|
|
|
|
|
defaultValue={userConfig.UCSGridConfig.color1}
|
|
|
|
|
/>
|
|
|
|
|
</Popover>
|
|
|
|
|
</Label>
|
|
|
|
|
<Label style={{ color: "#606E7A" }} className={Classes.INLINE} >
|
|
|
|
|
内线颜色:
|
|
|
|
|
<Popover
|
|
|
|
|
position={PopoverPosition.BOTTOM}
|
|
|
|
|
minimal
|
|
|
|
|
className="bp3-input-group"
|
|
|
|
|
content={
|
|
|
|
|
<SketchPicker
|
|
|
|
|
color={userConfig.UCSGridConfig.color2}
|
|
|
|
|
onChange={async (e: ColorResult) =>
|
|
|
|
|
{
|
|
|
|
|
userConfig.UCSGridConfig.color2 = e.hex;
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
}>
|
|
|
|
|
<InputGroup
|
|
|
|
|
defaultValue={userConfig.UCSGridConfig.color2}
|
|
|
|
|
/>
|
|
|
|
|
</Popover>
|
|
|
|
|
</Label>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Card >
|
|
|
|
|
);
|
|
|
|
|