@naviedu/room-platform-react 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.js +75 -50
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -8836,15 +8836,16 @@ var WHITEBOARD_POPOVER_SIZES = {
|
|
|
8836
8836
|
}
|
|
8837
8837
|
};
|
|
8838
8838
|
function useWhiteboardToolbarLayout() {
|
|
8839
|
+
var portalContainer = usePortalContainer();
|
|
8839
8840
|
var _useState = _sliced_to_array$v(useState(function() {
|
|
8840
|
-
return getViewport();
|
|
8841
|
+
return getViewport(portalContainer);
|
|
8841
8842
|
}), 2), viewport = _useState[0], setViewport = _useState[1];
|
|
8842
8843
|
var viewportRef = useRef(viewport);
|
|
8843
8844
|
var _useState1 = _sliced_to_array$v(useState(false), 2), toolbarOpen = _useState1[0], setToolbarOpen = _useState1[1];
|
|
8844
8845
|
var _useState2 = _sliced_to_array$v(useState(null), 2), activePopover = _useState2[0], setActivePopover = _useState2[1];
|
|
8845
8846
|
var _useState3 = _sliced_to_array$v(useState(false), 2), hasOpened = _useState3[0], setHasOpened = _useState3[1];
|
|
8846
8847
|
var _useState4 = _sliced_to_array$v(useState(function() {
|
|
8847
|
-
return getToolbarLayout(getDefaultToolbarPosition(getViewport()), getViewport());
|
|
8848
|
+
return getToolbarLayout(getDefaultToolbarPosition(getViewport(portalContainer)), getViewport(portalContainer));
|
|
8848
8849
|
}), 2), layout = _useState4[0], setLayout = _useState4[1];
|
|
8849
8850
|
var dragOriginRef = useRef(undefined);
|
|
8850
8851
|
useEffect(function() {
|
|
@@ -8853,20 +8854,24 @@ function useWhiteboardToolbarLayout() {
|
|
|
8853
8854
|
viewport
|
|
8854
8855
|
]);
|
|
8855
8856
|
useEffect(function() {
|
|
8856
|
-
var
|
|
8857
|
-
var nextViewport = getViewport();
|
|
8857
|
+
var handleViewportChange = function() {
|
|
8858
|
+
var nextViewport = getViewport(portalContainer);
|
|
8858
8859
|
viewportRef.current = nextViewport;
|
|
8859
8860
|
setViewport(nextViewport);
|
|
8860
8861
|
setLayout(function(currentLayout) {
|
|
8861
8862
|
return getToolbarLayout(hasOpened ? currentLayout.position : getDefaultToolbarPosition(nextViewport), nextViewport);
|
|
8862
8863
|
});
|
|
8863
8864
|
};
|
|
8864
|
-
window.addEventListener('resize',
|
|
8865
|
+
window.addEventListener('resize', handleViewportChange);
|
|
8866
|
+
var resizeObserver = portalContainer && typeof ResizeObserver !== 'undefined' ? new ResizeObserver(handleViewportChange) : undefined;
|
|
8867
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.observe(portalContainer);
|
|
8865
8868
|
return function() {
|
|
8866
|
-
window.removeEventListener('resize',
|
|
8869
|
+
window.removeEventListener('resize', handleViewportChange);
|
|
8870
|
+
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
|
|
8867
8871
|
};
|
|
8868
8872
|
}, [
|
|
8869
|
-
hasOpened
|
|
8873
|
+
hasOpened,
|
|
8874
|
+
portalContainer
|
|
8870
8875
|
]);
|
|
8871
8876
|
useEffect(function() {
|
|
8872
8877
|
var move = function(event) {
|
|
@@ -8978,24 +8983,24 @@ function useWhiteboardToolbarLayout() {
|
|
|
8978
8983
|
};
|
|
8979
8984
|
}
|
|
8980
8985
|
function getToolbarLayout(position, viewport) {
|
|
8981
|
-
var topDockPosition = WHITEBOARD_VIEWPORT_PADDING;
|
|
8982
|
-
var bottomDockPosition = viewport.height - WHITEBOARD_VIEWPORT_PADDING - WHITEBOARD_TOOLBAR_SIZE.horizontal.height;
|
|
8986
|
+
var topDockPosition = viewport.top + WHITEBOARD_VIEWPORT_PADDING;
|
|
8987
|
+
var bottomDockPosition = viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING - WHITEBOARD_TOOLBAR_SIZE.horizontal.height;
|
|
8983
8988
|
var nearTop = position.top <= topDockPosition + WHITEBOARD_DOCK_SNAP_DISTANCE;
|
|
8984
8989
|
var nearBottom = position.top >= bottomDockPosition - WHITEBOARD_DOCK_SNAP_DISTANCE;
|
|
8985
8990
|
if (nearTop || nearBottom) {
|
|
8986
|
-
var dock = nearTop && (!nearBottom || position.top <= viewport.height / 2) ? 'top' : 'bottom';
|
|
8991
|
+
var dock = nearTop && (!nearBottom || position.top <= viewport.top + viewport.height / 2) ? 'top' : 'bottom';
|
|
8987
8992
|
return {
|
|
8988
8993
|
dock: dock,
|
|
8989
8994
|
orientation: 'horizontal',
|
|
8990
8995
|
position: snapAndClampPosition(position, dock, WHITEBOARD_TOOLBAR_SIZE.horizontal, viewport)
|
|
8991
8996
|
};
|
|
8992
8997
|
}
|
|
8993
|
-
var leftDockPosition = WHITEBOARD_VIEWPORT_PADDING;
|
|
8994
|
-
var rightDockPosition = viewport.width - WHITEBOARD_VIEWPORT_PADDING - WHITEBOARD_TOOLBAR_SIZE.vertical.width;
|
|
8998
|
+
var leftDockPosition = viewport.left + WHITEBOARD_VIEWPORT_PADDING;
|
|
8999
|
+
var rightDockPosition = viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING - WHITEBOARD_TOOLBAR_SIZE.vertical.width;
|
|
8995
9000
|
var nearLeft = position.left <= leftDockPosition + WHITEBOARD_DOCK_SNAP_DISTANCE;
|
|
8996
9001
|
var nearRight = position.left >= rightDockPosition - WHITEBOARD_DOCK_SNAP_DISTANCE;
|
|
8997
9002
|
if (nearLeft || nearRight) {
|
|
8998
|
-
var dock1 = nearLeft && (!nearRight || position.left <= viewport.width / 2) ? 'left' : 'right';
|
|
9003
|
+
var dock1 = nearLeft && (!nearRight || position.left <= viewport.left + viewport.width / 2) ? 'left' : 'right';
|
|
8999
9004
|
return {
|
|
9000
9005
|
dock: dock1,
|
|
9001
9006
|
orientation: 'vertical',
|
|
@@ -9033,10 +9038,10 @@ function getDroppedToolbarLayout(position, viewport, preferredDropDock, dragPosi
|
|
|
9033
9038
|
}
|
|
9034
9039
|
function isOutsideDock(position, orientation, viewport, dock) {
|
|
9035
9040
|
var size = WHITEBOARD_TOOLBAR_SIZE[orientation];
|
|
9036
|
-
if (dock === 'left') return position.left < WHITEBOARD_VIEWPORT_PADDING;
|
|
9037
|
-
if (dock === 'right') return position.left + size.width > viewport.width - WHITEBOARD_VIEWPORT_PADDING;
|
|
9038
|
-
if (dock === 'top') return position.top < WHITEBOARD_VIEWPORT_PADDING;
|
|
9039
|
-
return position.top + size.height > viewport.height - WHITEBOARD_VIEWPORT_PADDING;
|
|
9041
|
+
if (dock === 'left') return position.left < viewport.left + WHITEBOARD_VIEWPORT_PADDING;
|
|
9042
|
+
if (dock === 'right') return position.left + size.width > viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING;
|
|
9043
|
+
if (dock === 'top') return position.top < viewport.top + WHITEBOARD_VIEWPORT_PADDING;
|
|
9044
|
+
return position.top + size.height > viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING;
|
|
9040
9045
|
}
|
|
9041
9046
|
function getDragPosition(event, dragOrigin, size) {
|
|
9042
9047
|
return {
|
|
@@ -9045,7 +9050,7 @@ function getDragPosition(event, dragOrigin, size) {
|
|
|
9045
9050
|
};
|
|
9046
9051
|
}
|
|
9047
9052
|
function canFitVertically(position, viewport) {
|
|
9048
|
-
return position.top >= WHITEBOARD_VIEWPORT_PADDING && position.top + WHITEBOARD_TOOLBAR_SIZE.vertical.height <= viewport.height - WHITEBOARD_VIEWPORT_PADDING;
|
|
9053
|
+
return position.top >= viewport.top + WHITEBOARD_VIEWPORT_PADDING && position.top + WHITEBOARD_TOOLBAR_SIZE.vertical.height <= viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING;
|
|
9049
9054
|
}
|
|
9050
9055
|
function getOutsideDock(position, orientation, viewport) {
|
|
9051
9056
|
var _candidates_filter_sort_;
|
|
@@ -9053,19 +9058,19 @@ function getOutsideDock(position, orientation, viewport) {
|
|
|
9053
9058
|
var candidates = [
|
|
9054
9059
|
[
|
|
9055
9060
|
'left',
|
|
9056
|
-
WHITEBOARD_VIEWPORT_PADDING - position.left
|
|
9061
|
+
viewport.left + WHITEBOARD_VIEWPORT_PADDING - position.left
|
|
9057
9062
|
],
|
|
9058
9063
|
[
|
|
9059
9064
|
'right',
|
|
9060
|
-
position.left + size.width - (viewport.width - WHITEBOARD_VIEWPORT_PADDING)
|
|
9065
|
+
position.left + size.width - (viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING)
|
|
9061
9066
|
],
|
|
9062
9067
|
[
|
|
9063
9068
|
'top',
|
|
9064
|
-
WHITEBOARD_VIEWPORT_PADDING - position.top
|
|
9069
|
+
viewport.top + WHITEBOARD_VIEWPORT_PADDING - position.top
|
|
9065
9070
|
],
|
|
9066
9071
|
[
|
|
9067
9072
|
'bottom',
|
|
9068
|
-
position.top + size.height - (viewport.height - WHITEBOARD_VIEWPORT_PADDING)
|
|
9073
|
+
position.top + size.height - (viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING)
|
|
9069
9074
|
]
|
|
9070
9075
|
];
|
|
9071
9076
|
return (_candidates_filter_sort_ = candidates.filter(function(param) {
|
|
@@ -9079,34 +9084,36 @@ function getOutsideDock(position, orientation, viewport) {
|
|
|
9079
9084
|
function snapAndClampPosition(position, dock, size, viewport) {
|
|
9080
9085
|
var clampedPosition = clampPosition(position, size, viewport);
|
|
9081
9086
|
if (dock === 'left') return _object_spread_props$g(_object_spread$i({}, clampedPosition), {
|
|
9082
|
-
left: WHITEBOARD_VIEWPORT_PADDING
|
|
9083
|
-
});
|
|
9084
|
-
if (dock === 'right') return _object_spread_props$g(_object_spread$i({}, clampedPosition), {
|
|
9085
|
-
left: viewport.width - WHITEBOARD_VIEWPORT_PADDING - size.width
|
|
9087
|
+
left: viewport.left + WHITEBOARD_VIEWPORT_PADDING
|
|
9086
9088
|
});
|
|
9089
|
+
if (dock === 'right') {
|
|
9090
|
+
return _object_spread_props$g(_object_spread$i({}, clampedPosition), {
|
|
9091
|
+
left: viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING - size.width
|
|
9092
|
+
});
|
|
9093
|
+
}
|
|
9087
9094
|
if (dock === 'top') return _object_spread_props$g(_object_spread$i({}, clampedPosition), {
|
|
9088
|
-
top: WHITEBOARD_VIEWPORT_PADDING
|
|
9095
|
+
top: viewport.top + WHITEBOARD_VIEWPORT_PADDING
|
|
9089
9096
|
});
|
|
9090
9097
|
return _object_spread_props$g(_object_spread$i({}, clampedPosition), {
|
|
9091
|
-
top: viewport.height - WHITEBOARD_VIEWPORT_PADDING - size.height
|
|
9098
|
+
top: viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING - size.height
|
|
9092
9099
|
});
|
|
9093
9100
|
}
|
|
9094
9101
|
function clampPosition(position, size, viewport) {
|
|
9095
9102
|
return {
|
|
9096
|
-
left: clamp(position.left, WHITEBOARD_VIEWPORT_PADDING, viewport.width - WHITEBOARD_VIEWPORT_PADDING - size.width),
|
|
9097
|
-
top: clamp(position.top, WHITEBOARD_VIEWPORT_PADDING, viewport.height - WHITEBOARD_VIEWPORT_PADDING - size.height)
|
|
9103
|
+
left: clamp(position.left, viewport.left + WHITEBOARD_VIEWPORT_PADDING, viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING - size.width),
|
|
9104
|
+
top: clamp(position.top, viewport.top + WHITEBOARD_VIEWPORT_PADDING, viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING - size.height)
|
|
9098
9105
|
};
|
|
9099
9106
|
}
|
|
9100
9107
|
function getDefaultToolbarPosition(viewport) {
|
|
9101
9108
|
return {
|
|
9102
|
-
left: WHITEBOARD_VIEWPORT_PADDING,
|
|
9103
|
-
top: Math.round((viewport.height - WHITEBOARD_TOOLBAR_SIZE.vertical.height) / 2)
|
|
9109
|
+
left: viewport.left + WHITEBOARD_VIEWPORT_PADDING,
|
|
9110
|
+
top: viewport.top + Math.round((viewport.height - WHITEBOARD_TOOLBAR_SIZE.vertical.height) / 2)
|
|
9104
9111
|
};
|
|
9105
9112
|
}
|
|
9106
9113
|
function getDefaultTriggerPosition(viewport) {
|
|
9107
9114
|
return {
|
|
9108
|
-
left: WHITEBOARD_VIEWPORT_PADDING,
|
|
9109
|
-
top: viewport.height - WHITEBOARD_VIEWPORT_PADDING - WHITEBOARD_TRIGGER_SIZE.height - WHITEBOARD_TRIGGER_BOTTOM_OFFSET
|
|
9115
|
+
left: viewport.left + WHITEBOARD_VIEWPORT_PADDING,
|
|
9116
|
+
top: viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING - WHITEBOARD_TRIGGER_SIZE.height - WHITEBOARD_TRIGGER_BOTTOM_OFFSET
|
|
9110
9117
|
};
|
|
9111
9118
|
}
|
|
9112
9119
|
function getPopoverSide(dock, position, toolbarSize, popoverSize, viewport) {
|
|
@@ -9124,19 +9131,19 @@ function getPreferredPopoverSide(dock, position, toolbarSize, viewport) {
|
|
|
9124
9131
|
var spaces = [
|
|
9125
9132
|
[
|
|
9126
9133
|
'right',
|
|
9127
|
-
viewport.width - (position.left + toolbarSize.width) - WHITEBOARD_VIEWPORT_PADDING
|
|
9134
|
+
viewport.left + viewport.width - (position.left + toolbarSize.width) - WHITEBOARD_VIEWPORT_PADDING
|
|
9128
9135
|
],
|
|
9129
9136
|
[
|
|
9130
9137
|
'left',
|
|
9131
|
-
position.left - WHITEBOARD_VIEWPORT_PADDING
|
|
9138
|
+
position.left - (viewport.left + WHITEBOARD_VIEWPORT_PADDING)
|
|
9132
9139
|
],
|
|
9133
9140
|
[
|
|
9134
9141
|
'bottom',
|
|
9135
|
-
viewport.height - (position.top + toolbarSize.height) - WHITEBOARD_VIEWPORT_PADDING
|
|
9142
|
+
viewport.top + viewport.height - (position.top + toolbarSize.height) - WHITEBOARD_VIEWPORT_PADDING
|
|
9136
9143
|
],
|
|
9137
9144
|
[
|
|
9138
9145
|
'top',
|
|
9139
|
-
position.top - WHITEBOARD_VIEWPORT_PADDING
|
|
9146
|
+
position.top - (viewport.top + WHITEBOARD_VIEWPORT_PADDING)
|
|
9140
9147
|
]
|
|
9141
9148
|
];
|
|
9142
9149
|
return _to_consumable_array$b(spaces).sort(function(left, right) {
|
|
@@ -9144,34 +9151,38 @@ function getPreferredPopoverSide(dock, position, toolbarSize, viewport) {
|
|
|
9144
9151
|
})[0][0];
|
|
9145
9152
|
}
|
|
9146
9153
|
function fitsPopover(side, position, toolbarSize, popoverSize, viewport) {
|
|
9147
|
-
if (side === 'left')
|
|
9154
|
+
if (side === 'left') {
|
|
9155
|
+
return position.left - WHITEBOARD_POPOVER_GAP - popoverSize.width >= viewport.left + WHITEBOARD_VIEWPORT_PADDING;
|
|
9156
|
+
}
|
|
9148
9157
|
if (side === 'right') {
|
|
9149
|
-
return position.left + toolbarSize.width + WHITEBOARD_POPOVER_GAP + popoverSize.width <= viewport.width - WHITEBOARD_VIEWPORT_PADDING;
|
|
9158
|
+
return position.left + toolbarSize.width + WHITEBOARD_POPOVER_GAP + popoverSize.width <= viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING;
|
|
9150
9159
|
}
|
|
9151
|
-
if (side === 'top')
|
|
9152
|
-
|
|
9160
|
+
if (side === 'top') {
|
|
9161
|
+
return position.top - WHITEBOARD_POPOVER_GAP - popoverSize.height >= viewport.top + WHITEBOARD_VIEWPORT_PADDING;
|
|
9162
|
+
}
|
|
9163
|
+
return position.top + toolbarSize.height + WHITEBOARD_POPOVER_GAP + popoverSize.height <= viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING;
|
|
9153
9164
|
}
|
|
9154
9165
|
function getPopoverStyle(position, toolbarSize, popoverSize, side, viewport) {
|
|
9155
9166
|
if (side === 'left') {
|
|
9156
9167
|
return {
|
|
9157
9168
|
left: position.left - popoverSize.width - WHITEBOARD_POPOVER_GAP,
|
|
9158
|
-
top: clamp(position.top, WHITEBOARD_VIEWPORT_PADDING, viewport.height - WHITEBOARD_VIEWPORT_PADDING - popoverSize.height)
|
|
9169
|
+
top: clamp(position.top, viewport.top + WHITEBOARD_VIEWPORT_PADDING, viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING - popoverSize.height)
|
|
9159
9170
|
};
|
|
9160
9171
|
}
|
|
9161
9172
|
if (side === 'right') {
|
|
9162
9173
|
return {
|
|
9163
9174
|
left: position.left + toolbarSize.width + WHITEBOARD_POPOVER_GAP,
|
|
9164
|
-
top: clamp(position.top, WHITEBOARD_VIEWPORT_PADDING, viewport.height - WHITEBOARD_VIEWPORT_PADDING - popoverSize.height)
|
|
9175
|
+
top: clamp(position.top, viewport.top + WHITEBOARD_VIEWPORT_PADDING, viewport.top + viewport.height - WHITEBOARD_VIEWPORT_PADDING - popoverSize.height)
|
|
9165
9176
|
};
|
|
9166
9177
|
}
|
|
9167
9178
|
if (side === 'top') {
|
|
9168
9179
|
return {
|
|
9169
|
-
left: clamp(position.left, WHITEBOARD_VIEWPORT_PADDING, viewport.width - WHITEBOARD_VIEWPORT_PADDING - popoverSize.width),
|
|
9180
|
+
left: clamp(position.left, viewport.left + WHITEBOARD_VIEWPORT_PADDING, viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING - popoverSize.width),
|
|
9170
9181
|
top: position.top - popoverSize.height - WHITEBOARD_POPOVER_GAP
|
|
9171
9182
|
};
|
|
9172
9183
|
}
|
|
9173
9184
|
return {
|
|
9174
|
-
left: clamp(position.left, WHITEBOARD_VIEWPORT_PADDING, viewport.width - WHITEBOARD_VIEWPORT_PADDING - popoverSize.width),
|
|
9185
|
+
left: clamp(position.left, viewport.left + WHITEBOARD_VIEWPORT_PADDING, viewport.left + viewport.width - WHITEBOARD_VIEWPORT_PADDING - popoverSize.width),
|
|
9175
9186
|
top: position.top + toolbarSize.height + WHITEBOARD_POPOVER_GAP
|
|
9176
9187
|
};
|
|
9177
9188
|
}
|
|
@@ -9181,10 +9192,23 @@ function getOppositeSide(side) {
|
|
|
9181
9192
|
if (side === 'top') return 'bottom';
|
|
9182
9193
|
return 'top';
|
|
9183
9194
|
}
|
|
9184
|
-
function getViewport() {
|
|
9195
|
+
function getViewport(container) {
|
|
9196
|
+
var width = typeof window === 'undefined' ? 1280 : window.innerWidth;
|
|
9197
|
+
var height = typeof window === 'undefined' ? 720 : window.innerHeight;
|
|
9198
|
+
if (!container || typeof window === 'undefined') {
|
|
9199
|
+
return {
|
|
9200
|
+
left: 0,
|
|
9201
|
+
top: 0,
|
|
9202
|
+
width: width,
|
|
9203
|
+
height: height
|
|
9204
|
+
};
|
|
9205
|
+
}
|
|
9206
|
+
var bounds = container.getBoundingClientRect();
|
|
9185
9207
|
return {
|
|
9186
|
-
|
|
9187
|
-
|
|
9208
|
+
left: bounds.left,
|
|
9209
|
+
top: bounds.top,
|
|
9210
|
+
width: bounds.width > 0 ? bounds.width : Math.max(0, width - bounds.left),
|
|
9211
|
+
height: bounds.height > 0 ? bounds.height : Math.max(0, height - bounds.top)
|
|
9188
9212
|
};
|
|
9189
9213
|
}
|
|
9190
9214
|
function clamp(value, min, max) {
|
|
@@ -9299,6 +9323,7 @@ function WhiteboardToolbar(param) {
|
|
|
9299
9323
|
var canWrite = permissions.includes('whiteboard:write');
|
|
9300
9324
|
var canClear = permissions.includes('whiteboard:clear');
|
|
9301
9325
|
var canOpenToolbar = canWrite || canClear;
|
|
9326
|
+
var portalContainer = usePortalContainer();
|
|
9302
9327
|
var _useWhiteboardToolbarLayout = useWhiteboardToolbarLayout(), activePopover = _useWhiteboardToolbarLayout.activePopover, closeActivePopover = _useWhiteboardToolbarLayout.closeActivePopover, closeToolbar = _useWhiteboardToolbarLayout.closeToolbar, dock = _useWhiteboardToolbarLayout.dock, getPopoverLayout = _useWhiteboardToolbarLayout.getPopoverLayout, openToolbar = _useWhiteboardToolbarLayout.openToolbar, orientation = _useWhiteboardToolbarLayout.orientation, startDrag = _useWhiteboardToolbarLayout.startDrag, togglePopover = _useWhiteboardToolbarLayout.togglePopover, toolbarOpen = _useWhiteboardToolbarLayout.toolbarOpen, toolbarStyle = _useWhiteboardToolbarLayout.toolbarStyle, triggerDock = _useWhiteboardToolbarLayout.triggerDock, triggerStyle = _useWhiteboardToolbarLayout.triggerStyle;
|
|
9303
9328
|
var toolbarRef = useRef(null);
|
|
9304
9329
|
var drawButtonRef = useRef(null);
|
|
@@ -9576,7 +9601,7 @@ function WhiteboardToolbar(param) {
|
|
|
9576
9601
|
]
|
|
9577
9602
|
}) : null
|
|
9578
9603
|
]
|
|
9579
|
-
}), document.body);
|
|
9604
|
+
}), portalContainer !== null && portalContainer !== void 0 ? portalContainer : document.body);
|
|
9580
9605
|
}
|
|
9581
9606
|
function getPopoverTriggerPosition(button) {
|
|
9582
9607
|
var rect = button === null || button === void 0 ? void 0 : button.getBoundingClientRect();
|