Skip to content

Commit afb1531

Browse files
committed
fix(micro-journeys): Edge fix for equalizeRelativeHeights, replace x and y with left and top
1 parent 81d0260 commit afb1531

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/core/utils/equalize-relative-heights.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ export const equalizeRelativeHeights = (
6363
items.forEach((item, i) => {
6464
const { container, elToEqualize } = item;
6565
item.relativeOffsetTop =
66-
elToEqualize.getBoundingClientRect().y -
67-
container.getBoundingClientRect().y;
66+
elToEqualize.getBoundingClientRect().top -
67+
container.getBoundingClientRect().top;
6868
indexOfLongest = indexOfLongest === null ? i : indexOfLongest;
6969
indexOfLongest =
7070
items[indexOfLongest].relativeOffsetTop < item.relativeOffsetTop

packages/micro-journeys/src/two-character-layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class BoltTwoCharacterLayout extends withLitHtml() {
141141
`.${boltCharacterCenterClass}`,
142142
);
143143
connection.style.minWidth = `calc(${nextCharacterCenter.getBoundingClientRect()
144-
.x - connection.getBoundingClientRect().x}px + 50%)`;
144+
.left - connection.getBoundingClientRect().left}px + 50%)`;
145145
}
146146
});
147147
};

0 commit comments

Comments
 (0)