@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.
@@ -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 + gapBetweenButtonAndPopover}px`;
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;