Browse Source

Square selection should work in all directions

pull/168/head
hazam 6 years ago
parent
commit
8c1af23d59
  1. 4
      src/index.tsx

4
src/index.tsx

@ -1537,7 +1537,9 @@ class App extends React.Component<{}, AppState> { @@ -1537,7 +1537,9 @@ class App extends React.Component<{}, AppState> {
this.state.scrollY;
draggingElement.width = width;
// Make a perfect square or circle when shift is enabled
draggingElement.height = e.shiftKey ? width : height;
draggingElement.height = e.shiftKey
? Math.abs(width) * Math.sign(height)
: height;
generateDraw(draggingElement);

Loading…
Cancel
Save