aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-04-30 17:59:40 -0400
committerbobzel <zzzman@gmail.com>2024-04-30 17:59:40 -0400
commit776c9cd88fc0799426ced87f36cb215dfdc1854b (patch)
tree7197f88a6417eec0a0c94a6c51002ec7e1411958 /src/client/views/MainView.tsx
parentdaeae9db15372b8bd5f5aab387988051341c9209 (diff)
unwinding some import cycles. added PinFuncs and .from(dv:DocumentView) for CollectionFreeForm stiuff
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index be13b14f5..d3dd51ac6 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -76,6 +76,7 @@ import { PresBox } from './nodes/trails';
import { AnchorMenu } from './pdf/AnchorMenu';
import { GPTPopup } from './pdf/GPTPopup/GPTPopup';
import { TopBar } from './topbar/TopBar';
+import { CollectionFreeFormView } from './collections/collectionFreeForm';
const _global = (window /* browser */ || global) /* node */ as any;
const { LEFT_MENU_WIDTH, TOPBAR_HEIGHT } = require('./global/globalCssVariables.module.scss'); // prettier-ignore
@@ -964,7 +965,7 @@ export class MainView extends ObservableReactComponent<{}> {
}
@computed get snapLines() {
const dragged = DragManager.docsBeingDragged.lastElement() ?? SelectionManager.Docs.lastElement();
- const dragPar = dragged ? DocumentManager.Instance.getDocumentView(dragged)?.CollectionFreeFormView : undefined;
+ const dragPar = dragged ? CollectionFreeFormView.from(DocumentManager.Instance.getDocumentView(dragged)) : undefined;
return !dragPar?.layoutDoc.freeform_snapLines ? null : (
<div className="mainView-snapLines">
<svg style={{ width: '100%', height: '100%' }}>