修复:避免封边数据被配置覆盖

pull/2019/head
ChenX 2 years ago
parent 857648f728
commit ded5647607

@ -60,7 +60,7 @@ interface IConfigProps
} }
/** /**
* *... Fuckusertconfig.ts
*/ */
@observer @observer
export class UserConfig extends React.Component<IConfigProps, {}>{ export class UserConfig extends React.Component<IConfigProps, {}>{

@ -41,12 +41,17 @@ export class SealingStore extends BoardEdgesEditor implements IConfigStore
{ {
return { option: toJS(this.option) }; return { option: toJS(this.option) };
} }
private _inited = false;//hack
UpdateOption(cof: IConfigOption) UpdateOption(cof: IConfigOption)
{ {
if (this._inited) return;//避免初始化曲线后载入配置把现有的配置覆盖掉
Object.assign(this.option, cof.option); Object.assign(this.option, cof.option);
} }
protected InitCurve() protected InitCurve()
{ {
this._inited = true;
let dataColorMap = new Map<string, number>();//data->color let dataColorMap = new Map<string, number>();//data->color
let canUseColor: number[] = [];//可使用的颜色 let canUseColor: number[] = [];//可使用的颜色
let highSizes = this.option.highSizes; let highSizes = this.option.highSizes;

Loading…
Cancel
Save