aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-16 14:57:29 -0500
committerbobzel <zzzman@gmail.com>2023-11-16 14:57:29 -0500
commitf00096cea4613c13672ba5dbc0bd60c461c92603 (patch)
tree1f2838b628e1a0847ce9793a5765de7b13224301 /src/client/views/DocumentDecorations.tsx
parent570e96292219a7c7c9fe496ba0606cc6b9f72abf (diff)
fixed alt-drag to toggle scroll mode. fixed replaceTab to work properly with panelNames. made slides pointing to trails open the target trails in situ. cleaned up code when starting drag to call freeformview more nicel. fixed brush/highlight of tabs. made collectionFreeformView/FreeformDocs use a more robust and simpler approach to caching freeform values.
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index ff7daa2eb..33886e791 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -486,8 +486,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
this._snapY = e.pageY;
const ffviewSet = new Set<CollectionFreeFormView>();
SelectionManager.Views().forEach(docView => {
- const ffview = docView.props.CollectionFreeFormDocumentView?.().props.CollectionFreeFormView;
- ffview && ffviewSet.add(ffview);
+ docView.CollectionFreeFormView && ffviewSet.add(docView.CollectionFreeFormView);
this._dragHeights.set(docView.layoutDoc, { start: NumCast(docView.rootDoc._height), lowest: NumCast(docView.rootDoc._height) });
});
Array.from(ffviewSet).map(ffview => ffview.dragStarting(false, false));
@@ -814,8 +813,8 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
bounds.r = Math.max(bounds.x, Math.max(leftBounds, Math.min(window.innerWidth, bounds.r + borderRadiusDraggerWidth + this._resizeBorderWidth / 2) - this._resizeBorderWidth / 2 - borderRadiusDraggerWidth));
bounds.b = Math.max(bounds.y, Math.max(topBounds, Math.min(window.innerHeight, bounds.b + this._resizeBorderWidth / 2 + this._linkBoxHeight) - this._resizeBorderWidth / 2 - this._linkBoxHeight));
- const useLock = bounds.r - bounds.x > 135 && seldocview.props.CollectionFreeFormDocumentView;
- const useRotation = !hideResizers && seldocview.rootDoc.type !== DocumentType.EQUATION && seldocview.props.CollectionFreeFormDocumentView; // when do we want an object to not rotate?
+ const useLock = bounds.r - bounds.x > 135 && seldocview.CollectionFreeFormDocumentView;
+ const useRotation = !hideResizers && seldocview.rootDoc.type !== DocumentType.EQUATION && seldocview.CollectionFreeFormDocumentView; // when do we want an object to not rotate?
const rotation = SelectionManager.Views().length == 1 ? NumCast(seldocview.rootDoc._rotation) : 0;
const resizerScheme = '';
@@ -878,7 +877,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
)}
</div>
);
- const freeformDoc = SelectionManager.Views().some(v => v.props.CollectionFreeFormDocumentView?.());
+ const freeformDoc = SelectionManager.Views().some(v => v.CollectionFreeFormDocumentView);
return (
<div className="documentDecorations" style={{ display: this._showNothing && !freeformDoc ? 'none' : undefined }}>
<div