diff --git a/packages/x6/src/view/edge.ts b/packages/x6/src/view/edge.ts index b4718d25b77..0220a3cf6a9 100644 --- a/packages/x6/src/view/edge.ts +++ b/packages/x6/src/view/edge.ts @@ -202,6 +202,7 @@ export class EdgeView< this.renderMarkup() this.renderLabels() this.update() + this.renderExternalTools() return this } @@ -541,12 +542,7 @@ export class EdgeView< this.updateLabelPositions() this.updateToolsPosition() this.updateArrowheadMarkers() - - if (options.toolId == null) { - this.renderExternalTools() - } else { - this.updateTools(options) - } + this.updateTools(options) return this } diff --git a/packages/x6/src/view/tool.ts b/packages/x6/src/view/tool.ts index d90370c26dd..c9799f1d3bb 100644 --- a/packages/x6/src/view/tool.ts +++ b/packages/x6/src/view/tool.ts @@ -327,7 +327,7 @@ export namespace ToolsView { protected cellView: TargetView - protected visible: boolean + protected visible = true protected childNodes: KeyValue @@ -440,7 +440,7 @@ export namespace ToolsView { } isVisible() { - return this.visible + return !!this.visible } focus() {