diff options
author | bobzel <zzzman@gmail.com> | 2022-05-12 12:17:12 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-05-12 12:17:12 -0400 |
commit | c31bb0d5d8c4d42fb5cd97b1582de0cae1b16ca0 (patch) | |
tree | 4ba3f42c13095418db18374a5a0537f7da910b88 /src/client/views/StyleProvider.tsx | |
parent | 37f3c5f1d13bcb8a54d2b0a242df2ee499703dc5 (diff) |
fixed perfromance (flickering, speed) issues with having pointerEvents prop invalidate documents - switched to using a function to avoid flickering on PDFs of annotations in particular.
Diffstat (limited to 'src/client/views/StyleProvider.tsx')
-rw-r--r-- | src/client/views/StyleProvider.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/StyleProvider.tsx b/src/client/views/StyleProvider.tsx index ca9826ab9..5056dedaf 100644 --- a/src/client/views/StyleProvider.tsx +++ b/src/client/views/StyleProvider.tsx @@ -204,7 +204,7 @@ export function DefaultStyleProvider(doc: Opt<Doc>, props: Opt<DocumentViewProps } case StyleProp.PointerEvents: if (doc?.type === DocumentType.MARKER) return "none"; - if (props?.pointerEvents === "none") return "none"; + if (props?.pointerEvents?.() === "none") return "none"; const layer = doc && props?.layerProvider?.(doc); const isInk = doc && StrCast(Doc.Layout(doc).layout).includes(InkingStroke.name); if (opacity() === 0 || (isInk && !docProps?.treeViewDoc) || doc?.isInkMask) return "none"; |