|
|
|
@ -1,11 +1,12 @@
|
|
|
|
|
import { observable, toJS } from "mobx";
|
|
|
|
|
import { DataAdapter } from "../../Common/DataAdapter";
|
|
|
|
|
import { Singleton } from "../../Common/Singleton";
|
|
|
|
|
import { IConfigOption } from "../../UI/Components/Board/UserConfigComponent";
|
|
|
|
|
import { IConfigStore } from "../../UI/Store/BoardStore";
|
|
|
|
|
import { ISmoothEdgeOption, IUiOption } from "../../UI/Store/OptionInterface/IOptionInterface";
|
|
|
|
|
import { SmoothEdgeType } from "./SetSmoothEdge";
|
|
|
|
|
|
|
|
|
|
export class SmoothEdgeStore implements IConfigStore
|
|
|
|
|
export class SmoothEdgeStore extends Singleton implements IConfigStore
|
|
|
|
|
{
|
|
|
|
|
@observable configName = "默认";
|
|
|
|
|
@observable configsNames = ['默认'];
|
|
|
|
@ -20,13 +21,15 @@ export class SmoothEdgeStore implements IConfigStore
|
|
|
|
|
|
|
|
|
|
InitOption()
|
|
|
|
|
{
|
|
|
|
|
this.option = {
|
|
|
|
|
Object.assign(this.option, {
|
|
|
|
|
version: 2,
|
|
|
|
|
smoothEdge: 0,
|
|
|
|
|
edge: 0,
|
|
|
|
|
scale: 5,
|
|
|
|
|
filterArrs: Array.from({ length: 20 }, () => ["", "封厚边"]),
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
if (this.uiOption)
|
|
|
|
|
Object.assign(this.uiOption, DataAdapter.ConvertUIData(this.option));
|
|
|
|
|
}
|
|
|
|
|
get UiOption()
|
|
|
|
|
{
|
|
|
|
@ -69,6 +72,3 @@ export class SmoothEdgeStore implements IConfigStore
|
|
|
|
|
Object.assign(this.uiOption, DataAdapter.ConvertUIData(cof.option));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const smoothEdgeStore = new SmoothEdgeStore();
|
|
|
|
|