From 8c81fb7c2e6e9842570d27a84b1a1c600c82c16b Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Thu, 8 Nov 2018 16:06:39 +0100 Subject: added possibility to pass attribues into a constructor like: `new SVG.Rect({width:100})` --- src/elements/Element.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/elements/Element.js') diff --git a/src/elements/Element.js b/src/elements/Element.js index a38b2ac..fe513e9 100644 --- a/src/elements/Element.js +++ b/src/elements/Element.js @@ -7,8 +7,8 @@ import SVGNumber from '../types/SVGNumber.js' const Doc = getClass(root) export default class Element extends Dom { - constructor (node) { - super(node) + constructor (node, attrs) { + super(node, attrs) // initialize data object this.dom = {} -- cgit v1.2.3