Martin McKeaveney
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
12 additions and
2 deletions
-
packages/client/src/components/app/Layout.svelte
-
packages/client/src/components/preview/DNDPositionIndicator.svelte
|
|
@ -353,7 +353,7 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* Reduce padding */ |
|
|
/* Reduce padding */ |
|
|
.mobile .main { |
|
|
.mobile:not(.layout--none) .main { |
|
|
padding: 16px; |
|
|
padding: 16px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -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, |
|
|
|