diff options
Diffstat (limited to 'src/G.js')
-rw-r--r-- | src/G.js | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -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()) } }) |