@trudb/tru-common-lib 0.2.129 → 0.2.131

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.
@@ -6018,8 +6018,8 @@ class TruDataGridCellRenderer {
6018
6018
  let clickedElement = event.target;
6019
6019
  if (clickedElement instanceof Element) {
6020
6020
  let rect = clickedElement.getBoundingClientRect();
6021
- this.contextMenuPosition.x = rect.x + 'px';
6022
- this.contextMenuPosition.y = (event.pageY) + 'px';
6021
+ this.contextMenuPosition.x = event.clientX + 'px';
6022
+ this.contextMenuPosition.y = event.clientY + 'px';
6023
6023
  this.contextMenu.menu?.focusFirstItem('mouse');
6024
6024
  this.contextMenu.openMenu();
6025
6025
  }
@@ -6068,11 +6068,12 @@ class TruDataGridCellRenderer {
6068
6068
  }
6069
6069
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridCellRenderer, deps: [{ token: TruDataContext }, { token: TruDataGridClipboard }], target: i0.ɵɵFactoryTarget.Component });
6070
6070
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.3", type: TruDataGridCellRenderer, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "contextMenu", first: true, predicate: MatMenuTrigger, descendants: true }], ngImport: i0, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
6071
- <div style="visibility: hidden; position: absolute;"
6071
+ <div style="visibility: hidden; position: fixed;"
6072
6072
  [style.left]="contextMenuPosition.x"
6073
- [matMenuTriggerFor]="truDataGridContextMenu">
6073
+ [style.top]="contextMenuPosition.y"
6074
+ [matMenuTriggerFor]="truDataGridCellContextMenu">
6074
6075
  </div>
6075
- <mat-menu #truDataGridContextMenu="matMenu">
6076
+ <mat-menu #truDataGridCellContextMenu="matMenu">
6076
6077
  <button mat-menu-item (click)="onCopy($event)">
6077
6078
  <mat-icon [svgIcon]="'copy-icon'"></mat-icon>
6078
6079
  <span>Copy</span>
@@ -6094,11 +6095,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
6094
6095
  MatButtonModule,
6095
6096
  MatMenuModule
6096
6097
  ], changeDetection: ChangeDetectionStrategy.OnPush, template: `<div (contextmenu)="onRightClick($event)">{{displayValue}}
6097
- <div style="visibility: hidden; position: absolute;"
6098
+ <div style="visibility: hidden; position: fixed;"
6098
6099
  [style.left]="contextMenuPosition.x"
6099
- [matMenuTriggerFor]="truDataGridContextMenu">
6100
+ [style.top]="contextMenuPosition.y"
6101
+ [matMenuTriggerFor]="truDataGridCellContextMenu">
6100
6102
  </div>
6101
- <mat-menu #truDataGridContextMenu="matMenu">
6103
+ <mat-menu #truDataGridCellContextMenu="matMenu">
6102
6104
  <button mat-menu-item (click)="onCopy($event)">
6103
6105
  <mat-icon [svgIcon]="'copy-icon'"></mat-icon>
6104
6106
  <span>Copy</span>