aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2022-08-11 13:09:11 -0400
committermehekj <mehek.jethani@gmail.com>2022-08-11 13:09:11 -0400
commite611aa3096a9eda6ac94e20c86f263d338533d49 (patch)
tree2737d472b15e88e2f5640358a21b7a95071d3d99 /src/client/views/DocumentDecorations.tsx
parent5c4b22b50e4693419daac777669b258b155f6ea9 (diff)
parent3c08d65a63e04d421954193742a49d539b842c20 (diff)
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index c53e61699..3544f74b4 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -201,7 +201,10 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
const finished = action((force?: boolean) => {
if ((force || --iconifyingCount === 0) && this._iconifyBatch) {
if (this._deleteAfterIconify) {
- views.forEach(iconView => iconView.props.removeDocument?.(iconView.props.Document));
+ views.forEach(iconView => {
+ Doc.setNativeView(iconView.props.Document);
+ iconView.props.removeDocument?.(iconView.props.Document);
+ });
SelectionManager.DeselectAll();
}
this._iconifyBatch?.end();
@@ -351,7 +354,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
@action
onPointerDown = (e: React.PointerEvent): void => {
- DragManager.docsBeingDragged = SelectionManager.Views().map(dv => dv.rootDoc);
+ DragManager.docsBeingDragged.push(...SelectionManager.Views().map(dv => dv.rootDoc));
this._inkDragDocs = DragManager.docsBeingDragged
.filter(doc => doc.type === DocumentType.INK)
.map(doc => {
@@ -491,7 +494,6 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
let actualdW = Math.max(width + dW * scale, 20);
let actualdH = Math.max(height + dH * scale, 20);
const fixedAspect = nwidth && nheight && (!doc._fitWidth || e.ctrlKey || doc.nativeHeightUnfrozen);
- console.log(fixedAspect);
if (fixedAspect) {
if ((Math.abs(dW) > Math.abs(dH) && ((!dragBottom && !dragTop) || !modifyNativeDim)) || dragRight) {
if (dragRight && modifyNativeDim) {