diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-04 21:46:33 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-04 21:46:33 +0100 |
commit | d654ab010adf42aab757529b6c09f27215740b27 (patch) | |
tree | 95baa420a8eb71f64220b27b822bcab403d4d535 /src/svg.js | |
parent | d22dce113a4a61d76b3c0e7c7fb77231f575c6fd (diff) | |
download | svg.js-d654ab010adf42aab757529b6c09f27215740b27.tar.gz svg.js-d654ab010adf42aab757529b6c09f27215740b27.zip |
Revert back to classes, fix remaining tests
Diffstat (limited to 'src/svg.js')
-rw-r--r-- | src/svg.js | 30 |
1 files changed, 10 insertions, 20 deletions
@@ -58,21 +58,11 @@ extend([ Classes.Gradient ], getMethodsFor('radius')) -const containerMethods = getMethodsFor('Container') -// FIXME: We need a container array -for (let i in containers) { - extend(containers[i], containerMethods) -} - -const elementMethods = getMethodsFor('Element') -const eventTargetMethods = getMethodsFor('EventTarget') -for (let i in elements) { - extend(elements[i], elementMethods) - extend(elements[i], eventTargetMethods) - extend(elements[i], getConstructor('EventTarget')) - extend(elements[i], getConstructor('Element')) - extend(elements[i], getConstructor('Memory')) -} +extend(Classes.EventTarget, getMethodsFor('EventTarget')) +extend(Classes.Element, getMethodsFor('Element')) +extend(Classes.Element, getMethodsFor('Parent')) +extend(Classes.Element, getConstructor('Memory')) +extend(Classes.Container, getMethodsFor('Container')) registerMorphableType([ Classes.SVGNumber, @@ -102,15 +92,13 @@ import * as regex from './regex.js' SVG.regex = regex - - // satisfy tests, fix later -import * as ns from './namespaces' +import * as ns from './namespaces.js' SVG.get = SVG SVG.find = find Object.assign(SVG, ns) -import Base from './Base.js' -SVG.Element = SVG.Parent = SVG.Shape = SVG.Container = Base +// import Base from './Base.js' +// SVG.Element = SVG.Parent = SVG.Shape = SVG.Container = Base import {easing} from './Controller.js' SVG.easing = easing import * as events from './event.js' @@ -121,3 +109,5 @@ SVG.ObjectBag = ObjectBag SVG.NonMorphable = NonMorphable import parser from './parser.js' SVG.parser = parser +import * as defaults from './defaults.js' +SVG.defaults = defaults |