summaryrefslogtreecommitdiffstats
path: root/src/elements/Ellipse.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/Ellipse.js')
-rw-r--r--src/elements/Ellipse.js34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/elements/Ellipse.js b/src/elements/Ellipse.js
index 0350f1f..e1e1fe0 100644
--- a/src/elements/Ellipse.js
+++ b/src/elements/Ellipse.js
@@ -11,26 +11,34 @@ import Shape from './Shape.js'
import * as circled from '../modules/core/circled.js'
export default class Ellipse extends Shape {
- constructor (node) {
- super(nodeOrNew('ellipse', node), node)
+
+ constructor ( node ) {
+
+ super( nodeOrNew( 'ellipse', node ), node )
+
}
- size (width, height) {
- var p = proportionalSize(this, width, height)
+ size ( width, height ) {
+
+ var p = proportionalSize( this, width, height )
return this
- .rx(new SVGNumber(p.width).divide(2))
- .ry(new SVGNumber(p.height).divide(2))
+ .rx( new SVGNumber( p.width ).divide( 2 ) )
+ .ry( new SVGNumber( p.height ).divide( 2 ) )
+
}
+
}
-extend(Ellipse, circled)
+extend( Ellipse, circled )
-registerMethods('Container', {
+registerMethods( 'Container', {
// Create an ellipse
- ellipse: wrapWithAttrCheck(function (width, height) {
- return this.put(new Ellipse()).size(width, height).move(0, 0)
- })
-})
+ ellipse: wrapWithAttrCheck( function ( width, height ) {
+
+ return this.put( new Ellipse() ).size( width, height ).move( 0, 0 )
+
+ } )
+} )
-register(Ellipse)
+register( Ellipse )