summaryrefslogtreecommitdiffstats
path: root/src/G.js
blob: d20aba2397246bdad4ad45749803dd2378e2da2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Container from './Container.js'
import {nodeOrNew} from './tools.js'
import {register} from './adopter.js'
import {registerMethods} from './methods.js'

export default class G extends Container {
  constructor (node) {
    super(nodeOrNew('g', node), G)
  }
}

registerMethods({
  Element: {
    // Create a group element
    group: function () {
      return this.put(new G())
    }
  }
})

register(G)