We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c904c27 commit c3dda43Copy full SHA for c3dda43
src/hooks/events/selection.ts
@@ -60,8 +60,8 @@ const useSelection = () => {
60
this.update(newX, newY);
61
},
62
update: function (newX: number, newY: number) {
63
- this.currentX = newX - (+this.element?.attr("width") > 2 ? workspaceLeft : 0);
64
- this.currentY = newY - (+this.element?.attr("height") > 2 ? workspaceTop : 0);
+ this.currentX = newX - (+this.element?.attr("width") || this.currentX === this.originX ? workspaceLeft : 0);
+ this.currentY = newY - (+this.element?.attr("height") || this.currentY === this.originY ? workspaceTop : 0);
65
const attributes = this.getNewAttributes();
66
Object.keys(attributes).forEach((key) => {
67
this.element.attr(key, attributes[key]);
0 commit comments