aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorvkalev <vjk1883@gmail.com>2021-07-22 11:30:48 -0400
committervkalev <vjk1883@gmail.com>2021-07-22 11:30:48 -0400
commit8ee7ba27d765c8953c8b569ed981f91458d49079 (patch)
tree5af21f2993c7138e2e425a3dabe69bdd439aac82 /src/client/views/DocumentDecorations.tsx
parentfabaad0251cf4f64c1af7a37a5f3d6622011c058 (diff)
parent491fb6fc41792b1dfe7e3f9210b07a6b8e1eb0a7 (diff)
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into ink-gfx-victor
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index d1682c09d..d24ab974c 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -235,7 +235,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
this._resizeUndo = UndoManager.StartBatch("DocDecs resize");
this._snapX = e.pageX;
this._snapY = e.pageY;
- DragManager.docsBeingDragged.forEach(doc => this._dragHeights.set(doc, { start: NumCast(doc._height), lowest: NumCast(doc._height) }));
+ SelectionManager.Views().forEach(docView => this._dragHeights.set(docView.layoutDoc, { start: NumCast(docView.rootDoc._height), lowest: NumCast(docView.rootDoc._height) }));
}
onPointerMove = (e: PointerEvent, down: number[], move: number[]): boolean => {
@@ -382,7 +382,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
SnappingManager.clearSnapLines();
// detect autoHeight gesture and apply
- DragManager.docsBeingDragged.map(doc => ({ doc, hgts: this._dragHeights.get(doc) }))
+ SelectionManager.Views().map(docView => ({ doc: docView.layoutDoc, hgts: this._dragHeights.get(docView.layoutDoc) }))
.filter(pair => pair.hgts && pair.hgts.lowest < pair.hgts.start && pair.hgts.lowest <= 20)
.forEach(pair => pair.doc._autoHeight = true);
//need to change points for resize, or else rotation/control points will fail.