Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kumilingus committed Dec 2, 2024
1 parent 49f7913 commit cedef2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/joint-core/src/dia/ToolsView.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,12 @@ export const ToolsView = mvc.View.extend({
},

show: function() {
return this.blurTool(null);
this.blurTool(null);
// If this the first time the tools are shown, make sure they are mounted
if (!this.isMounted()) {
this.mount();
}
return this;
},

onRemove: function() {
Expand Down
2 changes: 2 additions & 0 deletions packages/joint-core/test/jointjs/dia/linkTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ QUnit.module('linkTools', function(hooks) {
linkView.hideTools();
paper.unfreeze();
assert.notOk(toolsView.isRendered);
assert.notOk(toolsView.el.isConnected);
linkView.showTools();
assert.ok(toolsView.isRendered);
assert.ok(toolsView.el.isConnected);
});
});

Expand Down

0 comments on commit cedef2d

Please sign in to comment.