Browse Source
Merge pull request #5274 from Budibase/bug/sev3/settings_bar_covering_button
Move settings bar below element if at very top
master
melohagan
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
0 deletions
-
packages/client/src/components/preview/SettingsBar.svelte
|
|
|
@ -66,6 +66,11 @@ |
|
|
|
newTop = deviceBottom - 44 |
|
|
|
} |
|
|
|
|
|
|
|
//If element is at the very top of the screen, put the bar below the element |
|
|
|
if (elBounds.top < elBounds.height) { |
|
|
|
newTop = elBounds.bottom + verticalOffset |
|
|
|
} |
|
|
|
|
|
|
|
// Horizontally, try to center first. |
|
|
|
// Failing that, render to left edge of component. |
|
|
|
// Failing that, render to right edge of component, |
|
|
|
|