From fe6993d6992b211b61e25b7174c756e2f2423c1b Mon Sep 17 00:00:00 2001 From: KDSBrowne Date: Wed, 3 Jan 2024 17:58:25 +0000 Subject: [PATCH] fix wheel zoom jitter --- .../imports/ui/components/whiteboard/component.jsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx b/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx index 93d2f182dd..92e5617f73 100644 --- a/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx @@ -252,6 +252,8 @@ export default function Whiteboard(props) { canvas.dispatchEvent(newEvent); } } + + window.dispatchEvent(new Event('resize')); } React.useEffect(() => { @@ -461,14 +463,6 @@ export default function Whiteboard(props) { } }, [tldrawAPI?.getPageState()?.camera, presentationWidth, presentationHeight]); - React.useEffect(() => { - if (isPresenter && slidePosition && tldrawAPI) { - const camera = tldrawAPI?.getPageState()?.camera; - const newZoom = calculateZoom(slidePosition?.viewBoxWidth, slidePosition?.viewBoxHeight); - tldrawAPI?.setCamera([camera?.point[0], camera?.point[1]], newZoom); - } - }, [slidePosition?.viewBoxWidth, slidePosition?.viewBoxHeight]); - // change tldraw camera when slidePosition changes React.useEffect(() => { if (tldrawAPI && !isPresenter && curPageId && slidePosition) {