update render wb condition | add operator

This commit is contained in:
KDSBrowne 2022-07-20 19:20:46 +00:00
parent 21f2a441ee
commit db41932fe7

View File

@ -257,7 +257,7 @@ export default function Whiteboard(props) {
setCameraFitSlide(cameraFitSlide);
return;
}
const camera = tldrawAPI.getPageState().camera;
const camera = tldrawAPI.getPageState()?.camera;
//don't allow zoom out more than fit
if (camera.zoom <= cameraFitSlide.zoom) {
tldrawAPI?.setCamera(cameraFitSlide.point, cameraFitSlide.zoom);
@ -498,7 +498,7 @@ export default function Whiteboard(props) {
isViewersCursorLocked={isViewersCursorLocked}
isMultiUserActive={isMultiUserActive}
>
{!hasWBAccess && !isPresenter ? readOnlyWB : editableWB}
{hasWBAccess || isPresenter ? editableWB : readOnlyWB}
</Cursors>
</>
);