fix dock param

This commit is contained in:
Ramón Souza 2023-06-02 14:46:17 -03:00
parent 11f23b71ab
commit 9f345c91bb

View File

@ -142,7 +142,7 @@ export default function Whiteboard(props) {
const setDockPosition = (setSetting) => { const setDockPosition = (setSetting) => {
if (hasWBAccess || isPresenter) { if (hasWBAccess || isPresenter) {
if (((height < SMALLEST_HEIGHT) || (width < SMALLEST_WIDTH))) { if (((height < SMALLEST_DOCK_HEIGHT) || (width < SMALLEST_DOCK_WIDTH))) {
setSetting('dockPosition', 'bottom'); setSetting('dockPosition', 'bottom');
} else { } else {
setSetting('dockPosition', isRTL ? 'left' : 'right'); setSetting('dockPosition', isRTL ? 'left' : 'right');
@ -1029,14 +1029,6 @@ export default function Whiteboard(props) {
const size = ((height < SMALL_HEIGHT) || (width < SMALL_WIDTH)) const size = ((height < SMALL_HEIGHT) || (width < SMALL_WIDTH))
? TOOLBAR_SMALL : TOOLBAR_LARGE; ? TOOLBAR_SMALL : TOOLBAR_LARGE;
if (hasWBAccess || isPresenter) {
if (((height < SMALLEST_DOCK_HEIGHT) || (width < SMALLEST_DOCK_WIDTH))) {
tldrawAPI?.setSetting('dockPosition', 'bottom');
} else {
tldrawAPI?.setSetting('dockPosition', isRTL ? 'left' : 'right');
}
}
const menuOffsetValues = { const menuOffsetValues = {
true: { true: {
true: `${styleMenuOffsetSmall}`, true: `${styleMenuOffsetSmall}`,