summaryrefslogtreecommitdiffstats
path: root/src/svg.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-04 21:46:33 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-04 21:46:33 +0100
commitd654ab010adf42aab757529b6c09f27215740b27 (patch)
tree95baa420a8eb71f64220b27b822bcab403d4d535 /src/svg.js
parentd22dce113a4a61d76b3c0e7c7fb77231f575c6fd (diff)
downloadsvg.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.js30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/svg.js b/src/svg.js
index 10135b1..1d72d64 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -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