Merge pull request #15278 from KDSBrowne/2.6-disable-hover-slidebg
Disable Background Slide Image Hover Highlight
This commit is contained in:
commit
ffb41cb90f
@ -231,9 +231,32 @@ export default function Whiteboard(props) {
|
||||
// until we handle saving of assets in akka.
|
||||
disableAssets={true}
|
||||
onMount={(app) => {
|
||||
if (!hasWBAccess && !isPresenter) app.onPan = () => {};
|
||||
setTLDrawAPI(app);
|
||||
props.setTldrawAPI(app);
|
||||
// disable for non presenter that doesn't have multi user access
|
||||
if (!hasWBAccess && !isPresenter) {
|
||||
app.onPan = () => {};
|
||||
app.setSelectedIds = () => {};
|
||||
app.setHoveredId = () => {};
|
||||
} else {
|
||||
// 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) {
|
||||
app.changePage(curPageId);
|
||||
if (slidePosition.zoom === 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user