@leanix/components 0.4.614 → 0.4.615

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10652,7 +10652,9 @@ class AngularNodeView extends NodeView {
10652
10652
  deleteNode: () => this.deleteNode()
10653
10653
  };
10654
10654
  this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);
10655
+ this.handleBlur = this.handleBlur.bind(this);
10655
10656
  this.editor.on('selectionUpdate', this.handleSelectionUpdate);
10657
+ this.editor.on('blur', this.handleBlur);
10656
10658
  // create renderer
10657
10659
  this.renderer = new AngularRenderer(this.component, injector, props);
10658
10660
  // Register drag handler
@@ -10691,7 +10693,10 @@ class AngularNodeView extends NodeView {
10691
10693
  this.selectNode();
10692
10694
  event.stopPropagation();
10693
10695
  };
10694
- this.dom.addEventListener('mousedown', this.handleMouseDown);
10696
+ const selection = this.editor.state.selection;
10697
+ if (selection instanceof NodeSelection && selection.node.type.name === 'lxDiagram') {
10698
+ this.dom.addEventListener('mousedown', this.handleMouseDown);
10699
+ }
10695
10700
  }
10696
10701
  get dom() {
10697
10702
  return this.renderer.dom;
@@ -10708,6 +10713,9 @@ class AngularNodeView extends NodeView {
10708
10713
  contentElement.appendChild(this.contentDOMElement);
10709
10714
  }
10710
10715
  }
10716
+ handleBlur() {
10717
+ this.deselectNode();
10718
+ }
10711
10719
  handleSelectionUpdate() {
10712
10720
  const { from, to } = this.editor.state.selection;
10713
10721
  if (from <= this.getPos() && to >= this.getPos() + this.node.nodeSize) {