Skip to content

重新覆盖point、middlePoint和circle样式不生效 #862

@Nxtspace

Description

@Nxtspace

@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();
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions