summaryrefslogtreecommitdiffstats
path: root/src/G.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-10-25 23:28:12 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-10-25 23:28:12 +0200
commitcfdfcc529dedff770dc54e78d2900d9a790f5766 (patch)
tree7b59c282a7823ded1d182aca95da5d55815456b2 /src/G.js
parent464af8b747389b7fdb569a933591c863b9be0f6b (diff)
downloadsvg.js-cfdfcc529dedff770dc54e78d2900d9a790f5766.tar.gz
svg.js-cfdfcc529dedff770dc54e78d2900d9a790f5766.zip
convert everything to es6 classes and imports
Diffstat (limited to 'src/G.js')
-rw-r--r--src/G.js26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/G.js b/src/G.js
index 0088a1c..2d60cfe 100644
--- a/src/G.js
+++ b/src/G.js
@@ -1,19 +1,15 @@
-SVG.G = SVG.invent({
- // Initialize node
- create: 'g',
+import Container from './Container.js'
+import Parent from './Parent.js'
- // Inherit from
- inherit: SVG.Container,
-
- // Add class methods
- extend: {
- },
+export default class G extends Container {
+ constructor (node) {
+ super(nodeorNew('group', node))
+ }
+}
- // Add parent method
- construct: {
- // Create a group element
- group: function () {
- return this.put(new SVG.G())
- }
+addFactory(Parent, {
+ // Create a group element
+ group: function () {
+ return this.put(new G())
}
})