- Fix: Detection of whether to keep ellipse (rx and ry when just created are now returning 0 instead of null); fixes #262

- Refactoring: Simplify `isValidUnit`
This commit is contained in:
Brett Zamir
2018-06-25 12:39:10 +08:00
parent 9f65b1adb9
commit ccb793e78c
2 changed files with 11 additions and 15 deletions

View File

@@ -2151,7 +2151,7 @@ const mouseUp = function (evt) {
break;
case 'ellipse':
attrs = $(element).attr(['rx', 'ry']);
keep = (attrs.rx != null || attrs.ry != null);
keep = (attrs.rx || attrs.ry);
break;
case 'fhellipse':
if ((freehand.maxx - freehand.minx) > 0 &&