diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-07 15:08:41 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-07 15:08:41 +0100 |
commit | 47fda3cf67cdc8ab20d3b1ba9d65a810adddf5ee (patch) | |
tree | c3dbd5df7f41c41ae5b41717ee8312ba84aeed07 /src/elements/Symbol.js | |
parent | 23595eba0ee68a86040d4667bdae4d9e6fe426ba (diff) | |
parent | 0cae4172fa0c7ee9b876b1cf2b38ea8be66d3584 (diff) | |
download | svg.js-47fda3cf67cdc8ab20d3b1ba9d65a810adddf5ee.tar.gz svg.js-47fda3cf67cdc8ab20d3b1ba9d65a810adddf5ee.zip |
Merge branch '875-es6' into 3.0.0
Diffstat (limited to 'src/elements/Symbol.js')
-rw-r--r-- | src/elements/Symbol.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/elements/Symbol.js b/src/elements/Symbol.js new file mode 100644 index 0000000..183f449 --- /dev/null +++ b/src/elements/Symbol.js @@ -0,0 +1,20 @@ +import { nodeOrNew, register } from '../utils/adopter.js' +import { registerMethods } from '../utils/methods.js' +import Container from './Container.js' + +export default class Symbol extends Container { + // Initialize node + constructor (node) { + super(nodeOrNew('symbol', node), Symbol) + } +} + +registerMethods({ + Container: { + symbol () { + return this.put(new Symbol()) + } + } +}) + +register(Symbol) |