disable hover highlight for background slide image

This commit is contained in:
KDSBrowne 2022-06-25 18:47:15 +00:00
parent fc1812f15a
commit 2d7ef92581

View File

@ -234,6 +234,25 @@ export default function Whiteboard(props) {
if (!hasWBAccess && !isPresenter) app.onPan = () => {}; if (!hasWBAccess && !isPresenter) app.onPan = () => {};
setTLDrawAPI(app); setTLDrawAPI(app);
props.setTldrawAPI(app); props.setTldrawAPI(app);
// disable pan for non presenter that doesn't have multi user access
if (!hasWBAccess && !isPresenter) app.onPan = () => {};
// disable hover highlight for background slide shape
app.setHoveredId = (id) => {
if (id.includes('slide-background')) return null;
app.patchState(
{
document: {
pageStates: {
[app.getPage()?.id]: {
hoveredId: id,
},
},
},
},
`set_hovered_id`
);
};
if (curPageId) { if (curPageId) {
app.changePage(curPageId); app.changePage(curPageId);
if (slidePosition.zoom === 0) { if (slidePosition.zoom === 0) {