summaryrefslogtreecommitdiffstats
path: root/src/elements/Circle.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/Circle.js')
-rw-r--r--src/elements/Circle.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/elements/Circle.js b/src/elements/Circle.js
index 2f0d7f2..3135ada 100644
--- a/src/elements/Circle.js
+++ b/src/elements/Circle.js
@@ -1,5 +1,10 @@
import { cx, cy, height, width, x, y } from '../modules/core/circled.js'
-import { extend, nodeOrNew, register } from '../utils/adopter.js'
+import {
+ extend,
+ nodeOrNew,
+ register,
+ wrapWithAttrCheck
+} from '../utils/adopter.js'
import { registerMethods } from '../utils/methods.js'
import SVGNumber from '../types/SVGNumber.js'
import Shape from './Shape.js'
@@ -33,11 +38,11 @@ extend(Circle, { x, y, cx, cy, width, height })
registerMethods({
Element: {
// Create circle element
- circle (size) {
+ circle: wrapWithAttrCheck(function (size) {
return this.put(new Circle())
.size(size)
.move(0, 0)
- }
+ })
}
})