@sebgroup/green-angular 1.8.3 → 1.8.4
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.
- package/esm2020/lib/context-menu/context-menu.component.mjs +4 -7
- package/fesm2015/sebgroup-green-angular.mjs +3 -6
- package/fesm2015/sebgroup-green-angular.mjs.map +1 -1
- package/fesm2020/sebgroup-green-angular.mjs +3 -6
- package/fesm2020/sebgroup-green-angular.mjs.map +1 -1
- package/lib/context-menu/context-menu.component.d.ts +0 -1
- package/package.json +2 -2
|
@@ -359,11 +359,11 @@ class NggContextMenuComponent {
|
|
|
359
359
|
}
|
|
360
360
|
const anchor = this.anchor?.nativeElement;
|
|
361
361
|
const buttonRect = anchor.getBoundingClientRect();
|
|
362
|
-
const left = this.calculateLeft(this.direction, buttonRect);
|
|
363
|
-
const top = this.calculateTop(buttonRect.bottom);
|
|
364
362
|
const gapBetweenButtonAndPopover = 3;
|
|
363
|
+
const left = this.calculateLeft(this.direction, buttonRect);
|
|
364
|
+
const top = buttonRect.bottom + gapBetweenButtonAndPopover;
|
|
365
365
|
this.left = `${left}px`;
|
|
366
|
-
this.top = `${top
|
|
366
|
+
this.top = `${top}px`;
|
|
367
367
|
this.isActive = true;
|
|
368
368
|
}
|
|
369
369
|
close() {
|
|
@@ -385,9 +385,6 @@ class NggContextMenuComponent {
|
|
|
385
385
|
break;
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
-
calculateTop(buttonRectBottom) {
|
|
389
|
-
return buttonRectBottom + window.pageYOffset;
|
|
390
|
-
}
|
|
391
388
|
calculateLeft(direction, buttonRect) {
|
|
392
389
|
const popover = this.popover?.nativeElement;
|
|
393
390
|
const popoverWidth = popover?.offsetWidth || 0;
|