aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-03-04 16:07:52 -0500
committerbobzel <zzzman@gmail.com>2024-03-04 16:07:52 -0500
commit2e99ef0512b8f1b5c089637643ff6addf5afd943 (patch)
treeb8cff42df265b24b47bc0e90d827b07110308e2f /src/client/views/DocumentDecorations.tsx
parent49cfa95fdb3653a1224d4e5e3380e111c8e2014f (diff)
cleaned up a number of things related to autoHeight and stacking/masonry/notetaking views
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 9d53c58c0..87ee962a0 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -562,7 +562,13 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
doc.y = NumCast(doc.y) + deltaY;
doc._layout_modificationDate = new DateField();
- scale.y !== 1 && (doc._layout_autoHeight = undefined);
+ if (scale.y !== 1) {
+ docView.layoutDoc._layout_autoHeight = undefined;
+ if (docView.layoutDoc._layout_autoHeight) {
+ // if autoHeight is still on because of a prototype
+ docView.layoutDoc._layout_autoHeight = false; // then don't inherit, but explicitly set it to false
+ }
+ }
}
};
@@ -597,7 +603,7 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
this._resizeUndo?.end();
// detect layout_autoHeight gesture and apply
- SelectionManager.Docs.forEach(doc => NumCast(doc._height) < 20 && (doc._layout_autoHeight = true));
+ SelectionManager.Views.forEach(view => NumCast(view.Document._height) < 20 && (view.layoutDoc._layout_autoHeight = true));
//need to change points for resize, or else rotation/control points will fail.
this._inkDragDocs
.map(oldbds => ({ oldbds, inkPts: Cast(oldbds.doc.data, InkField)?.inkData || [] }))