|
|
@ -1,45 +1,45 @@
|
|
|
|
import { Card, Checkbox, Classes, H5, Label } from '@blueprintjs/core';
|
|
|
|
import { Card, Checkbox, Classes, H5, Label } from '@blueprintjs/core';
|
|
|
|
|
|
|
|
import { observable } from 'mobx';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import { observer } from 'mobx-react';
|
|
|
|
import * as React from 'react';
|
|
|
|
import * as React from 'react';
|
|
|
|
|
|
|
|
import { UpdateCompositeEntityBoard } from '../../../../Add-on/ShowLines';
|
|
|
|
import { app } from '../../../../ApplicationServices/Application';
|
|
|
|
import { app } from '../../../../ApplicationServices/Application';
|
|
|
|
import { UserConfig, IMaxSizeProps, userConfig } from '../../../../Editor/UserConfig';
|
|
|
|
|
|
|
|
import { observable, has } from 'mobx';
|
|
|
|
|
|
|
|
import { DataAdapter } from './../../../../Common/DataAdapter';
|
|
|
|
|
|
|
|
import { ToasterInput } from '../../Toaster';
|
|
|
|
|
|
|
|
import { CheckObjectType } from '../../../../Common/CheckoutVaildValue';
|
|
|
|
import { CheckObjectType } from '../../../../Common/CheckoutVaildValue';
|
|
|
|
import { IUiOption } from '../../../Store/BoardInterface';
|
|
|
|
import { ColorMaterial } from '../../../../Common/ColorPalette';
|
|
|
|
|
|
|
|
import { safeEval } from '../../../../Common/eval';
|
|
|
|
import { Board } from '../../../../DatabaseServices/Entity/Board';
|
|
|
|
import { Board } from '../../../../DatabaseServices/Entity/Board';
|
|
|
|
import { CompositeEntity } from '../../../../DatabaseServices/Entity/CompositeEntity';
|
|
|
|
import { CompositeEntity } from '../../../../DatabaseServices/Entity/CompositeEntity';
|
|
|
|
import { safeEval } from '../../../../Common/eval';
|
|
|
|
import { IMaxSizeProps, userConfig } from '../../../../Editor/UserConfig';
|
|
|
|
import { UpdateCompositeEntityBoard } from '../../../../Add-on/ShowLines';
|
|
|
|
import { IUiOption } from '../../../Store/BoardInterface';
|
|
|
|
|
|
|
|
import { ToasterInput } from '../../Toaster';
|
|
|
|
|
|
|
|
import { DataAdapter } from './../../../../Common/DataAdapter';
|
|
|
|
import { ConfigStore } from './ConfigDialog';
|
|
|
|
import { ConfigStore } from './ConfigDialog';
|
|
|
|
import { ColorMaterial } from '../../../../Common/ColorPalette';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
interface IConfigProps
|
|
|
|
interface IConfigProps
|
|
|
|
{
|
|
|
|
{
|
|
|
|
config: UserConfig;
|
|
|
|
|
|
|
|
store: ConfigStore;
|
|
|
|
store: ConfigStore;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@observer
|
|
|
|
@observer
|
|
|
|
export class DrawConfigPanel extends React.Component<IConfigProps, {}> {
|
|
|
|
export class DrawConfigPanel extends React.Component<IConfigProps, {}> {
|
|
|
|
@observable maxSizeConfig: IUiOption<IMaxSizeProps>;
|
|
|
|
@observable maxSizeConfig: IUiOption<IMaxSizeProps>;
|
|
|
|
private oldShowLine: boolean;
|
|
|
|
_oldShowLine: boolean;
|
|
|
|
private toggleDrillingReactor = () =>
|
|
|
|
_toggleDrillingReactor = () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const userConfig = this.props.config;
|
|
|
|
|
|
|
|
userConfig.openDrillingReactor = !userConfig.openDrillingReactor;
|
|
|
|
userConfig.openDrillingReactor = !userConfig.openDrillingReactor;
|
|
|
|
app._drillingReactor.Enable = userConfig.openDrillingReactor;
|
|
|
|
};
|
|
|
|
|
|
|
|
_reDrilling = () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
userConfig.openReDrilling = !userConfig.openReDrilling;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
UNSAFE_componentWillMount()
|
|
|
|
UNSAFE_componentWillMount()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const cof = this.props.config;
|
|
|
|
this.maxSizeConfig = DataAdapter.ConvertUIData(userConfig.maxSize);
|
|
|
|
this.maxSizeConfig = DataAdapter.ConvertUIData(cof.maxSize);
|
|
|
|
this._oldShowLine = userConfig.showLines;
|
|
|
|
this.oldShowLine = userConfig.showLines;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
componentWillUnmount()
|
|
|
|
componentWillUnmount()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (this.oldShowLine !== userConfig.showLines)
|
|
|
|
if (this._oldShowLine !== userConfig.showLines)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
for (let en of app.Database.ModelSpace.Entitys)
|
|
|
|
for (let en of app.Database.ModelSpace.Entitys)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -56,7 +56,6 @@ export class DrawConfigPanel extends React.Component<IConfigProps, {}> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public render()
|
|
|
|
public render()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const userConfig = this.props.config;
|
|
|
|
|
|
|
|
const { kjlConfig } = userConfig;
|
|
|
|
const { kjlConfig } = userConfig;
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Card>
|
|
|
|
<Card>
|
|
|
@ -66,7 +65,13 @@ export class DrawConfigPanel extends React.Component<IConfigProps, {}> {
|
|
|
|
<Checkbox
|
|
|
|
<Checkbox
|
|
|
|
label="排钻反应器"
|
|
|
|
label="排钻反应器"
|
|
|
|
checked={userConfig.openDrillingReactor}
|
|
|
|
checked={userConfig.openDrillingReactor}
|
|
|
|
onChange={this.toggleDrillingReactor}
|
|
|
|
onChange={this._toggleDrillingReactor}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<Checkbox
|
|
|
|
|
|
|
|
label="插入图纸时重排"
|
|
|
|
|
|
|
|
disabled={!userConfig.openDrillingReactor}
|
|
|
|
|
|
|
|
checked={userConfig.openReDrilling}
|
|
|
|
|
|
|
|
onChange={this._reDrilling}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Checkbox
|
|
|
|
<Checkbox
|
|
|
|
label="板边缘大孔过滤"
|
|
|
|
label="板边缘大孔过滤"
|
|
|
|