Skip to content

Commit

Permalink
Fix aligment of popup menu for svg
Browse files Browse the repository at this point in the history
  • Loading branch information
Kisters-BS committed Jun 21, 2024
1 parent 1a7c2cf commit 26f91f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/components/dom/domhandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class DomHandler {
};

const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);
const targetHeight = target.offsetHeight;
const targetHeight = target.offsetHeight ?? target.getBoundingClientRect().height;
const targetOffset = target.getBoundingClientRect();
const windowScrollTop = this.getWindowScrollTop();
const windowScrollLeft = this.getWindowScrollLeft();
Expand Down Expand Up @@ -168,8 +168,8 @@ export class DomHandler {
const elementDimensions = element.offsetParent ? { width: element.offsetWidth, height: element.offsetHeight } : this.getHiddenElementDimensions(element);
const elementOuterHeight = elementDimensions.height;
const elementOuterWidth = elementDimensions.width;
const targetOuterHeight = target.offsetHeight;
const targetOuterWidth = target.offsetWidth;
const targetOuterHeight = target.offsetHeight ?? target.getBoundingClientRect().height;
const targetOuterWidth = target.offsetWidth ?? target.getBoundingClientRect().width;
const targetOffset = target.getBoundingClientRect();
const windowScrollTop = this.getWindowScrollTop();
const windowScrollLeft = this.getWindowScrollLeft();
Expand Down

0 comments on commit 26f91f0

Please sign in to comment.