summaryrefslogtreecommitdiffstats
path: root/src/elements/Polyline.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/Polyline.js')
-rw-r--r--src/elements/Polyline.js26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/elements/Polyline.js b/src/elements/Polyline.js
index 3749c93..5897295 100644
--- a/src/elements/Polyline.js
+++ b/src/elements/Polyline.js
@@ -11,28 +11,22 @@ import * as pointed from '../modules/core/pointed.js'
import * as poly from '../modules/core/poly.js'
export default class Polyline extends Shape {
-
// Initialize node
- constructor ( node ) {
-
- super( nodeOrNew( 'polyline', node ), node )
-
+ constructor (node) {
+ super(nodeOrNew('polyline', node), node)
}
-
}
-registerMethods( {
+registerMethods({
Container: {
// Create a wrapped polygon element
- polyline: wrapWithAttrCheck( function ( p ) {
-
+ polyline: wrapWithAttrCheck(function (p) {
// make sure plot is called as a setter
- return this.put( new Polyline() ).plot( p || new PointArray() )
-
- } )
+ return this.put(new Polyline()).plot(p || new PointArray())
+ })
}
-} )
+})
-extend( Polyline, pointed )
-extend( Polyline, poly )
-register( Polyline )
+extend(Polyline, pointed)
+extend(Polyline, poly)
+register(Polyline)