Skip to content

Commit 5687012

Browse files
Merge branch 'next' into 1909-side-menu-rtl
2 parents c89a5ba + 91d7706 commit 5687012

3 files changed

Lines changed: 8 additions & 13 deletions

File tree

src/components/HotspotEditorModal/_hotspot-editor-modal.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
& > *:last-child {
1515
margin-right: $layout-03;
1616
min-width: $right-side-width;
17+
overflow-y: auto;
1718
}
1819

1920
.#{$prefix}--tabs {

src/components/ImageCard/ImageHotspots.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,13 @@ export const zoom = (
387387
}
388388
};
389389

390-
const getAccumulatedOffset = (imageElement) => {
390+
/**
391+
* Since the imageElement is not at the borders of the screen, we need to calculate the X and Y offsets of the Image from the parents
392+
* @param {*} imageElement
393+
* @return {object} top, left pixels that indicate where the image is placed on the page
394+
*/
395+
export const getAccumulatedOffset = (imageElement) => {
396+
// TODO: replace with simpler approach and share as utility function: https://stackoverflow.com/questions/5601659/how-do-you-calculate-the-page-position-of-a-dom-element-when-the-body-can-be-rel
391397
const offset = {
392398
top: imageElement.offsetTop,
393399
left: imageElement.offsetLeft,

yarn.lock

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17124,18 +17124,6 @@ react-dnd-html5-backend@11.1.3:
1712417124
dependencies:
1712517125
dnd-core "^11.1.3"
1712617126

17127-
react-dnd-test-backend@^11.1.3:
17128-
version "11.1.3"
17129-
resolved "https://registry.yarnpkg.com/react-dnd-test-backend/-/react-dnd-test-backend-11.1.3.tgz#7af2cfa3dc891845ef0e4b8d2e58383b066b1f67"
17130-
integrity sha512-5qFm+NI2GdWIUfiYun0A8Gv0xjbq0NGOPS+f6z3x/3nTuliApjmqcM1lfTgePoz1FDG47ZofF58N8y96If62+Q==
17131-
dependencies:
17132-
dnd-core "^11.1.3"
17133-
17134-
react-dnd-test-utils@^11.1.3:
17135-
version "11.1.3"
17136-
resolved "https://registry.yarnpkg.com/react-dnd-test-utils/-/react-dnd-test-utils-11.1.3.tgz#edd36df5989ab6b868db5fea0dcdf25a64ac94f9"
17137-
integrity sha512-Yg+oTpXaCJ+NxEFt+qXJZX96dbar47EK410eXj7bDsIdYYTZzYO51BtEGlEvR/a9Kb4vEkhPZkJLxyCfqNrpjw==
17138-
1713917127
react-dnd@11.1.3:
1714017128
version "11.1.3"
1714117129
resolved "https://registry.yarnpkg.com/react-dnd/-/react-dnd-11.1.3.tgz#f9844f5699ccc55dfc81462c2c19f726e670c1af"

0 commit comments

Comments
 (0)