1
0
Fork 0
mirror of synced 2024-10-05 12:34:50 +13:00

Merge pull request #2900 from Budibase/ak-fixes

Misc fixes
This commit is contained in:
Martin McKeaveney 2021-10-06 15:17:48 +01:00 committed by GitHub
commit cf57367be0
2 changed files with 12 additions and 2 deletions

View file

@ -353,7 +353,7 @@
} }
/* Reduce padding */ /* Reduce padding */
.mobile .main { .mobile:not(.layout--none) .main {
padding: 16px; padding: 16px;
} }

View file

@ -17,7 +17,17 @@
if (!bounds || !side) { if (!bounds || !side) {
return null return null
} }
const { left, top, width, height } = bounds
// Get preview offset
const root = document.getElementById("clip-root")
const rootBounds = root.getBoundingClientRect()
// Subtract preview offset from bounds
let { left, top, width, height } = bounds
left -= rootBounds.left
top -= rootBounds.top
// Determine position
if (side === Sides.Top || side === Sides.Bottom) { if (side === Sides.Top || side === Sides.Bottom) {
return { return {
top: side === Sides.Top ? top - 4 : top + height, top: side === Sides.Top ? top - 4 : top + height,