diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-12 11:21:34 -0500 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-12 11:21:34 -0500 |
commit | 9be5d339fa2e6d79a68f5265fa56f34ecf9a8141 (patch) | |
tree | 0fc5cb793bf1a3bee2f5e2d461a2286722a6f7b5 /src/client/views/DocumentDecorations.tsx | |
parent | 983957cf513b355d043ad8a712475f344eb7b553 (diff) | |
parent | 2f5051296883d3473e2eb1df648d27a0102d04ed (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into filters
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index aeb2d582b..c263c5cf5 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -254,8 +254,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b move[1] = thisPt.thisY - this._snapY; this._snapX = thisPt.thisX; this._snapY = thisPt.thisY; - let dragBottom = false; - let dragRight = false; + let dragBottom = false, dragRight = false, dragBotRight = false; let dX = 0, dY = 0, dW = 0, dH = 0; switch (this._resizeHdlId) { case "": break; @@ -282,6 +281,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b case "documentDecorations-bottomRightResizer": dW = move[0]; dH = move[1]; + dragBotRight = true; break; case "documentDecorations-bottomResizer": dH = move[1]; @@ -336,7 +336,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b doc._nativeWidth = actualdW / (doc._width || 1) * Doc.NativeWidth(doc); } else { if (!doc._fitWidth) doc._height = nheight / nwidth * actualdW; - else if (!e.ctrlKey) doc._height = actualdH; + else if (!e.ctrlKey || dragBotRight) doc._height = actualdH; } doc._width = actualdW; } @@ -346,7 +346,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b doc._autoHeight = false; } else { if (!doc._fitWidth) doc._width = nwidth / nheight * actualdH; - else if (!e.ctrlKey) doc._width = actualdW; + else if (!e.ctrlKey || dragBotRight) doc._width = actualdW; } doc._height = actualdH; } |