aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-22 21:45:28 -0500
committerbobzel <zzzman@gmail.com>2024-01-22 21:45:28 -0500
commit001127c07f95173d7036db19d07dcfb1135f3caa (patch)
tree6489446110038835536f1916791cfe6faa793bc3 /src/client/views/DocumentDecorations.tsx
parent953a298b49c2345741fd7989f9b62cadd76eea52 (diff)
fixed schema rows to render, fix for resizing docs from left side. all locking docs in non freeform view. fix for labelBox with multiple rows to keep top rows. cleaned up docViewPath/containerViewPath &
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index c96253405..8db972ef0 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -344,10 +344,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
e,
returnFalse, // don't care about move or up event,
emptyFunction, // just care about whether we get a click event
- e => UndoManager.RunInBatch(
- () => SelectionManager.Docs.forEach(doc =>
- doc._pointerEvents = (doc._lockedPosition = !doc._lockedPosition)? 'none' : undefined ),
- 'toggleBackground' ) // prettier-ignore
+ e => UndoManager.RunInBatch(() => SelectionManager.Docs.forEach(doc => Doc.toggleLockedPosition(doc)), 'toggleBackground')
);
e.stopPropagation();
};
@@ -530,7 +527,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
doc.xPadding = NumCast(doc.xPadding) * scale.x;
doc.yPadding = NumCast(doc.yPadding) * scale.y;
} else {
- const refCent = docView.screenToContentsTransform().transformPoint(refPt[0], refPt[1]); // fixed reference point for resize (ie, a point that doesn't move)
+ const refCent = docView.screenToViewTransform().transformPoint(refPt[0], refPt[1]); // fixed reference point for resize (ie, a point that doesn't move)
const [nwidth, nheight] = [docView.nativeWidth, docView.nativeHeight];
const [initWidth, initHeight] = [NumCast(doc._width, 1), NumCast(doc._height)];
@@ -689,7 +686,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
);
const bounds = this.ClippedBounds;
- const useLock = bounds.r - bounds.x > 135 && seldocview.CollectionFreeFormDocumentView;
+ const useLock = bounds.r - bounds.x > 135;
const useRotation = !hideResizers && seldocview.Document.type !== DocumentType.EQUATION && seldocview.CollectionFreeFormDocumentView; // when do we want an object to not rotate?
const rotation = SelectionManager.Views.length == 1 ? seldocview.screenToContentsTransform().inverse().RotateDeg : 0;