Skip to content

Commit

Permalink
修复调整元素后点击空白处元素会发生偏移的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wanglin25 committed Dec 6, 2022
1 parent 10345ad commit 9319973
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion tiny-whiteboard/dist/tiny-whiteboard.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -2244,6 +2244,7 @@ class Elements$1 {
return;
}
this.resizingElement.resize(...args);
this.app.render.render();
}
endResize() {
this.isResizing = false;
Expand Down Expand Up @@ -3932,6 +3933,7 @@ class Elements {
return;
}
this.resizingElement.resize(...args);
this.app.render.render();
}
endResize() {
this.isResizing = false;
Expand Down Expand Up @@ -4321,7 +4323,6 @@ class TinyWhiteboard extends EventEmitter {
this.selection.onMousemove(e, event);
} else {
this.elements.handleResize(e, mx, my, event.mouseOffset.x, event.mouseOffset.y);
this.render.render();
}
} else if (["rectangle", "diamond", "triangle"].includes(this.drawType)) {
this.elements.creatingRectangleLikeElement(this.drawType, mx, my, offsetX, offsetY);
Expand Down
4 changes: 2 additions & 2 deletions tiny-whiteboard/dist/tiny-whiteboard.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tiny-whiteboard/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiny-whiteboard",
"version": "0.1.9",
"version": "0.1.10",
"description": "一个简单的在线白板",
"authors": [
{
Expand Down
1 change: 1 addition & 0 deletions tiny-whiteboard/src/Elements.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ export default class Elements {
return
}
this.resizingElement.resize(...args)
this.app.render.render()
}

// 结束元素调整操作
Expand Down
1 change: 0 additions & 1 deletion tiny-whiteboard/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ class TinyWhiteboard extends EventEmitter {
event.mouseOffset.x,
event.mouseOffset.y
)
this.render.render()
}
} else if (['rectangle', 'diamond', 'triangle'].includes(this.drawType)) {
// 类矩形元素绘制模式
Expand Down

0 comments on commit 9319973

Please sign in to comment.