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

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

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

register(G)