aboutsummaryrefslogtreecommitdiffstats
path: root/src/elements/Circle.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-06-13 01:43:37 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2023-06-13 01:43:37 +0200
commit03322672782a6318b019eff33fe44ec800d6f12c (patch)
tree9d807e1585cf28a1ea98e87b855932dba00f1880 /src/elements/Circle.js
parent8e18b4698edd00f83af0be05bb3374f92fecaeb9 (diff)
downloadsvg.js-03322672782a6318b019eff33fe44ec800d6f12c.tar.gz
svg.js-03322672782a6318b019eff33fe44ec800d6f12c.zip
dependency updates, easier formatting
Diffstat (limited to 'src/elements/Circle.js')
-rw-r--r--src/elements/Circle.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/elements/Circle.js b/src/elements/Circle.js
index 6981b05..5dae51e 100644
--- a/src/elements/Circle.js
+++ b/src/elements/Circle.js
@@ -10,25 +10,25 @@ import SVGNumber from '../types/SVGNumber.js'
import Shape from './Shape.js'
export default class Circle extends Shape {
- constructor (node, attrs = node) {
+ constructor(node, attrs = node) {
super(nodeOrNew('circle', node), attrs)
}
- radius (r) {
+ radius(r) {
return this.attr('r', r)
}
// Radius x value
- rx (rx) {
+ rx(rx) {
return this.attr('r', rx)
}
// Alias radius x value
- ry (ry) {
+ ry(ry) {
return this.rx(ry)
}
- size (size) {
+ size(size) {
return this.radius(new SVGNumber(size).divide(2))
}
}
@@ -39,9 +39,7 @@ registerMethods({
Container: {
// Create circle element
circle: wrapWithAttrCheck(function (size = 0) {
- return this.put(new Circle())
- .size(size)
- .move(0, 0)
+ return this.put(new Circle()).size(size).move(0, 0)
})
}
})