mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fix resizing when leaves windows
This commit is contained in:
parent
83a53a24ec
commit
4aa557bcdb
1 changed files with 4 additions and 2 deletions
|
@ -1231,8 +1231,10 @@ class App extends React.Component<{}, AppState> {
|
||||||
const el = this.state.resizingElement;
|
const el = this.state.resizingElement;
|
||||||
const selectedElements = elements.filter(el => el.isSelected);
|
const selectedElements = elements.filter(el => el.isSelected);
|
||||||
if (selectedElements.length === 1) {
|
if (selectedElements.length === 1) {
|
||||||
const x = e.clientX - target.offsetLeft - this.state.scrollX;
|
const x =
|
||||||
const y = e.clientY - target.offsetTop - this.state.scrollY;
|
e.clientX - CANVAS_WINDOW_OFFSET_LEFT - this.state.scrollX;
|
||||||
|
const y =
|
||||||
|
e.clientY - CANVAS_WINDOW_OFFSET_TOP - this.state.scrollY;
|
||||||
selectedElements.forEach(element => {
|
selectedElements.forEach(element => {
|
||||||
switch (resizeHandle) {
|
switch (resizeHandle) {
|
||||||
case "nw":
|
case "nw":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue