disable hover highlight for background slide image
This commit is contained in:
parent
fc1812f15a
commit
2d7ef92581
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user