diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-02-11 21:17:24 -0500 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-02-11 21:17:24 -0500 |
| commit | 793cc99ab134bc5aa4667c95def851ce08d35146 (patch) | |
| tree | c1bb67df5fab0b035bb0ceb9141af81b40876931 /src/client/views/DocumentDecorations.tsx | |
| parent | 9f8653ab3d7f82a5d82b925bf339bef8d6723f5c (diff) | |
added aspect resizing. fixed pinch zoom for macs
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 8a94bff36..7efaa5533 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -111,8 +111,10 @@ export class DocumentDecorations extends React.Component { let actualdH = Math.max(element.height + (dH * scale), 20); element.x += dX * (actualdW - element.width); element.y += dY * (actualdH - element.height); - element.width = actualdW; - element.height = actualdH; + if (Math.abs(dW) > Math.abs(dH)) + element.width = actualdW; + else + element.height = actualdH; } }) } |
