summaryrefslogtreecommitdiffstats
path: root/src/G.js
diff options
context:
space:
mode:
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())
}
})