diff options
Diffstat (limited to 'src/elements/Ellipse.js')
-rw-r--r-- | src/elements/Ellipse.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/elements/Ellipse.js b/src/elements/Ellipse.js index 4ba8771..0350f1f 100644 --- a/src/elements/Ellipse.js +++ b/src/elements/Ellipse.js @@ -1,4 +1,9 @@ -import { extend, nodeOrNew, register } from '../utils/adopter.js' +import { + extend, + nodeOrNew, + register, + wrapWithAttrCheck +} from '../utils/adopter.js' import { proportionalSize } from '../utils/utils.js' import { registerMethods } from '../utils/methods.js' import SVGNumber from '../types/SVGNumber.js' @@ -23,9 +28,9 @@ extend(Ellipse, circled) registerMethods('Container', { // Create an ellipse - ellipse: function (width, height) { + ellipse: wrapWithAttrCheck(function (width, height) { return this.put(new Ellipse()).size(width, height).move(0, 0) - } + }) }) register(Ellipse) |