@registerEditTool()
export class Hole2DEditTool extends EditTool {
constructor(editor: Editor) {
super(editor);
}
public static name = "Hole2DEditTool";
public get tag() {
return Hole2DEditTool.name;
}
public onLoad(): void {
this.editConfig = {
...this.editConfig,
moveable: true,
resizeable: true,
rotateable: false,
skewable: false,
flipable: false,
middlePoint: [{ fill: "", stroke: "" }, {}, { fill: "", stroke: "" }, {}],
point: {
fill: "",
stroke: "",
},
circle: {
fill: "",
stroke: "",
},
};
this.editor.config.point = {
fill: "",
stroke: "",
};
this.editor.config.middlePoint = {
fill: "",
stroke: "",
};
this.editor.config.circle = {
fill: "",
stroke: "",
};
this.editor.update();
this.editBox.add(this.view);
}
public onUnload(): void {
this.editBox.remove(this.view);
}
public onDestroy(): void {
this.view.removeAll();
}
}
@registerEditTool()
export class Hole2DEditTool extends EditTool {
constructor(editor: Editor) {
super(editor);
}
public static name = "Hole2DEditTool";
public get tag() {
return Hole2DEditTool.name;
}
public onLoad(): void {
this.editConfig = {
...this.editConfig,
moveable: true,
resizeable: true,
rotateable: false,
skewable: false,
flipable: false,
middlePoint: [{ fill: "", stroke: "" }, {}, { fill: "", stroke: "" }, {}],
point: {
fill: "",
stroke: "",
},
circle: {
fill: "",
stroke: "",
},
};
}
public onUnload(): void {
this.editBox.remove(this.view);
}
public onDestroy(): void {
this.view.removeAll();
}
}