aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-28 12:57:52 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-28 12:57:52 +0100
commit58fd0d68bc8b46b23f8cdc65190f08d4e524eb57 (patch)
tree04247b959cb0517eb4a891c6afbabb734bb892bb /src/utils
parent08b27426fa631a6200a5423161770acab50403bd (diff)
downloadsvg.js-58fd0d68bc8b46b23f8cdc65190f08d4e524eb57.tar.gz
svg.js-58fd0d68bc8b46b23f8cdc65190f08d4e524eb57.zip
Fix build chain so that we now have multiple builds. Details below:
- svg.js: The esm bundle - svg.min.js: The bundle for all browsers for maximum support - svg.node.js: The bundle for node - polyfill.js: Using svg.min.js requires this polyfill in case the Browser does not understand all of ./config/polyfillList.js - polyfillIE.js: This is required when you use IE11 (polyfill.js still required) Please note, that not all test pass for IE11 due to its rounding issues and wrong calculation of bbox. Also note, that `defaultPrevented` is not working for CustomEvents in IE11.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/adopter.js2
-rw-r--r--src/utils/methods.js13
2 files changed, 3 insertions, 12 deletions
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index 52d589e..a4c60de 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -5,7 +5,7 @@ import { globals } from '../utils/window.js'
import Base from '../types/Base.js'
const elements = {}
-export const root = Symbol('root')
+export const root = '___SYMBOL___ROOT___'
// Method for element creation
export function makeNode (name) {
diff --git a/src/utils/methods.js b/src/utils/methods.js
index 70f9329..bf30a1e 100644
--- a/src/utils/methods.js
+++ b/src/utils/methods.js
@@ -1,5 +1,4 @@
const methods = {}
-const constructors = {}
const names = []
export function registerMethods (name, m) {
@@ -11,8 +10,8 @@ export function registerMethods (name, m) {
}
if (typeof name === 'object') {
- for (let [_name, _m] of Object.entries(name)) {
- registerMethods(_name, _m)
+ for (let _name in name) {
+ registerMethods(_name, name[_name])
}
return
}
@@ -32,11 +31,3 @@ export function getMethodNames () {
export function addMethodNames (_names) {
names.push(..._names)
}
-
-export function registerConstructor (name, setup) {
- constructors[name] = setup
-}
-
-export function getConstructor (name) {
- return constructors[name] ? { setup: constructors[name], name } : {}
-}