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

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

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

register(G)