@veloceapps/sdk 7.0.2-16 → 7.0.2-17

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.
@@ -1001,6 +1001,7 @@ class ElementHoverPlugin {
1001
1001
  this.destroyed$ = new Subject();
1002
1002
  this.mouseOverListenerBound = this.mouseOverListener.bind(this);
1003
1003
  this.mouseLeaveListenerBound = this.mouseLeaveListener.bind(this);
1004
+ this.clickListenerBound = this.clickListener.bind(this);
1004
1005
  combineLatest([this.runtimeEditorService.editorMode$, this.isHovered$, this.isSelected$])
1005
1006
  .pipe(takeUntil(this.destroyed$))
1006
1007
  .subscribe(([editorMode]) => {
@@ -1027,10 +1028,12 @@ class ElementHoverPlugin {
1027
1028
  attachListeners() {
1028
1029
  this.el.nativeElement.addEventListener('mouseover', this.mouseOverListenerBound);
1029
1030
  this.el.nativeElement.addEventListener('mouseleave', this.mouseLeaveListenerBound);
1031
+ this.el.nativeElement.addEventListener('click', this.clickListenerBound);
1030
1032
  }
1031
1033
  detachListeners() {
1032
1034
  this.el.nativeElement.removeEventListener('mouseover', this.mouseOverListenerBound);
1033
1035
  this.el.nativeElement.removeEventListener('mouseleave', this.mouseLeaveListenerBound);
1036
+ this.el.nativeElement.removeEventListener('click', this.clickListenerBound);
1034
1037
  }
1035
1038
  mouseOverListener(e) {
1036
1039
  const path = e.composedPath();
@@ -1044,6 +1047,11 @@ class ElementHoverPlugin {
1044
1047
  this.isHovered$.next(isHovered);
1045
1048
  }
1046
1049
  }
1050
+ clickListener(e) {
1051
+ if (this.el.nativeElement === e.target) {
1052
+ this.runtimeEditorService.selectedElementPath$.next(this.metadata.path);
1053
+ }
1054
+ }
1047
1055
  mouseLeaveListener() {
1048
1056
  this.isHovered$.next(false);
1049
1057
  }