diff options
author | geireann <60007097+geireann@users.noreply.github.com> | 2021-07-22 15:25:37 -0400 |
---|---|---|
committer | geireann <60007097+geireann@users.noreply.github.com> | 2021-07-22 15:25:37 -0400 |
commit | b4ad8cc62c51648c41f4b0ea2816f9086ed5c711 (patch) | |
tree | a4486669d6850fa0137e15beb1abce4d933cfd7d /src/client/views/DocumentDecorations.tsx | |
parent | af33c5a46f0680dad41532a86557193bf8af3b08 (diff) | |
parent | 491fb6fc41792b1dfe7e3f9210b07a6b8e1eb0a7 (diff) |
Merge branch 'master' into Ashley
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index bf939d57c..65a97a49d 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. |