This repository was archived by the owner on Nov 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -20,4 +20,7 @@ module.exports = class Ellipse extends ToolWithStroke
2020 lc .drawShapeInProgress (@currentShape )
2121
2222 end : (x , y , lc ) ->
23+ # If there is no height or width, dont save
24+ if @currentShape .height == 0 or @currentShape .width == 0
25+ return
2326 lc .saveShape (@currentShape )
Original file line number Diff line number Diff line change @@ -24,4 +24,9 @@ module.exports = class Line extends ToolWithStroke
2424 lc .drawShapeInProgress (@currentShape )
2525
2626 end : (x , y , lc ) ->
27+ # If start == end, dont save
28+ sameX = @currentShape .x1 == @currentShape .x2
29+ sameY = @currentShape .y1 == @currentShape .y2
30+ if sameX and sameY
31+ return
2732 lc .saveShape (@currentShape )
Original file line number Diff line number Diff line change @@ -19,4 +19,7 @@ module.exports = class Rectangle extends ToolWithStroke
1919 lc .drawShapeInProgress (@currentShape )
2020
2121 end : (x , y , lc ) ->
22+ # If there is no height or width, dont save
23+ if @currentShape .height == 0 or @currentShape .width == 0
24+ return
2225 lc .saveShape (@currentShape )
You can’t perform that action at this time.
0 commit comments