Merge pull request #15659 from JoVictorNunes/issue-15658
fix(whiteboard toolbar): reduce distance from the bottom
This commit is contained in:
commit
406c215add
@ -29,6 +29,7 @@ const SMALL_HEIGHT = 435;
|
|||||||
const SMALLEST_HEIGHT = 363;
|
const SMALLEST_HEIGHT = 363;
|
||||||
const TOOLBAR_SMALL = 28;
|
const TOOLBAR_SMALL = 28;
|
||||||
const TOOLBAR_LARGE = 38;
|
const TOOLBAR_LARGE = 38;
|
||||||
|
const TOOLBAR_OFFSET = 0;
|
||||||
|
|
||||||
const TldrawGlobalStyle = createGlobalStyle`
|
const TldrawGlobalStyle = createGlobalStyle`
|
||||||
${({ hideContextMenu }) => hideContextMenu && `
|
${({ hideContextMenu }) => hideContextMenu && `
|
||||||
@ -270,7 +271,7 @@ export default function Whiteboard(props) {
|
|||||||
}
|
}
|
||||||
if (props.height < SMALLEST_HEIGHT && tdTools) {
|
if (props.height < SMALLEST_HEIGHT && tdTools) {
|
||||||
tldrawAPI?.setSetting('dockPosition', 'bottom');
|
tldrawAPI?.setSetting('dockPosition', 'bottom');
|
||||||
tdTools.parentElement.style.bottom = `${TOOLBAR_SMALL}px`;
|
tdTools.parentElement.style.bottom = `${TOOLBAR_OFFSET}px`;
|
||||||
}
|
}
|
||||||
// removes tldraw native help menu button
|
// removes tldraw native help menu button
|
||||||
tdTools?.parentElement?.nextSibling?.remove();
|
tdTools?.parentElement?.nextSibling?.remove();
|
||||||
|
Loading…
Reference in New Issue
Block a user