diff options
author | bobzel <zzzman@gmail.com> | 2023-09-08 17:02:49 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-09-08 17:02:49 -0400 |
commit | 888ddd78737781f8a2d045b5f1e41788c512c94d (patch) | |
tree | 476eea33e601861bb063e41023abf927f55eab62 /src/client/views/OverlayView.tsx | |
parent | fdaf11b65b0a4b729c2c08fff24a6802ebba6674 (diff) |
don't remove current recording from overlay, added closeOnSelect option for dropdown. place recording box on screen. fixe overlayView to keep views on screen. fixed schema view checkboxes. don't cause tab to rerender when colelctoin type changes. add dropdown to filter indicator to find filters.
Diffstat (limited to 'src/client/views/OverlayView.tsx')
-rw-r--r-- | src/client/views/OverlayView.tsx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/client/views/OverlayView.tsx b/src/client/views/OverlayView.tsx index 5d95c5fda..c174befc0 100644 --- a/src/client/views/OverlayView.tsx +++ b/src/client/views/OverlayView.tsx @@ -16,6 +16,7 @@ import { LightboxView } from './LightboxView'; import { DocumentView, DocumentViewInternal } from './nodes/DocumentView'; import './OverlayView.scss'; import { DefaultStyleProvider } from './StyleProvider'; +const _global = (window /* browser */ || global) /* node */ as any; export type OverlayDisposer = () => void; @@ -115,6 +116,20 @@ export class OverlayView extends React.Component { super(props); if (!OverlayView.Instance) { OverlayView.Instance = this; + new _global.ResizeObserver( + action((entries: any) => { + for (const entry of entries) { + DocListCast(Doc.MyOverlayDocs?.data).forEach(doc => { + if (NumCast(doc.overlayX) > entry.contentRect.width - 10) { + doc.overlayX = entry.contentRect.width - 10; + } + if (NumCast(doc.overlayY) > entry.contentRect.height - 10) { + doc.overlayY = entry.contentRect.height - 10; + } + }); + } + }) + ).observe(window.document.body); } } |