Skip to content

Commit

Permalink
fix: 🐛 not rerender tools when edge update (#2095)
Browse files Browse the repository at this point in the history
  • Loading branch information
NewByVector authored May 9, 2022
1 parent cfb77ae commit 26ce96f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions packages/x6/src/view/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export class EdgeView<
this.renderMarkup()
this.renderLabels()
this.update()
this.renderExternalTools()

return this
}
Expand Down Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions packages/x6/src/view/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export namespace ToolsView {

protected cellView: TargetView

protected visible: boolean
protected visible = true

protected childNodes: KeyValue<Element>

Expand Down Expand Up @@ -440,7 +440,7 @@ export namespace ToolsView {
}

isVisible() {
return this.visible
return !!this.visible
}

focus() {
Expand Down

0 comments on commit 26ce96f

Please sign in to comment.