diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 16:06:39 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 16:06:39 +0100 |
commit | 8c81fb7c2e6e9842570d27a84b1a1c600c82c16b (patch) | |
tree | b5de85d617f5761db7cdfdce70d8a0f7cc059aba /src/elements/Gradient.js | |
parent | f7f6c4b801172ce119d4ea9a650c543670474784 (diff) | |
download | svg.js-8c81fb7c2e6e9842570d27a84b1a1c600c82c16b.tar.gz svg.js-8c81fb7c2e6e9842570d27a84b1a1c600c82c16b.zip |
added possibility to pass attribues into a constructor like: `new SVG.Rect({width:100})`
Diffstat (limited to 'src/elements/Gradient.js')
-rw-r--r-- | src/elements/Gradient.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/elements/Gradient.js b/src/elements/Gradient.js index cf8aeaa..cfa2950 100644 --- a/src/elements/Gradient.js +++ b/src/elements/Gradient.js @@ -7,10 +7,10 @@ import baseFind from '../modules/core/selector.js' import * as gradiented from '../modules/core/gradiented.js' export default class Gradient extends Container { - constructor (type) { + constructor (type, attrs) { super( nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type), - Gradient + attrs ) } |