summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-17 10:42:19 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-17 10:42:19 +0100
commit079f6f0ac37cb6d62501e8c397cc9850936f26e6 (patch)
treecfdac1e222180436b1e8bcf245c3fbb2140224a8 /src
parentbf6e2aeb13f9a4bee2be1f8f7a70ca1a73215245 (diff)
downloadsvg.js-079f6f0ac37cb6d62501e8c397cc9850936f26e6.tar.gz
svg.js-079f6f0ac37cb6d62501e8c397cc9850936f26e6.zip
cleanup a few files
Diffstat (limited to 'src')
-rw-r--r--src/animation/Controller.js2
-rw-r--r--src/elements/Dom.js3
-rw-r--r--src/modules/core/selector.js2
-rw-r--r--src/types/EventTarget.js24
4 files changed, 15 insertions, 16 deletions
diff --git a/src/animation/Controller.js b/src/animation/Controller.js
index 537a075..cee7115 100644
--- a/src/animation/Controller.js
+++ b/src/animation/Controller.js
@@ -45,7 +45,7 @@ export let easing = {
}
}
},
- // https://www.w3.org/TR/css-easing-1/#step-timing-function-algo
+ // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo
steps: function (steps, stepPosition = 'end') {
// deal with "jump-" prefix
stepPosition = stepPosition.split('-').reverse()[0]
diff --git a/src/elements/Dom.js b/src/elements/Dom.js
index 55d5858..0808443 100644
--- a/src/elements/Dom.js
+++ b/src/elements/Dom.js
@@ -6,6 +6,7 @@ import {
makeInstance,
register
} from '../utils/adopter.js'
+import { find } from '../modules/core/selector';
import { globals } from '../utils/window.js'
import { map } from '../utils/utils.js'
import { ns } from '../modules/core/namespaces.js'
@@ -301,5 +302,5 @@ export default class Dom extends EventTarget {
}
}
-extend(Dom, { attr })
+extend(Dom, { attr, find })
register(Dom)
diff --git a/src/modules/core/selector.js b/src/modules/core/selector.js
index 83a919f..6fcf05e 100644
--- a/src/modules/core/selector.js
+++ b/src/modules/core/selector.js
@@ -14,5 +14,3 @@ export default function baseFind (query, parent) {
export function find (query) {
return baseFind(query, this.node)
}
-
-registerMethods('Dom', { find })
diff --git a/src/types/EventTarget.js b/src/types/EventTarget.js
index 31d01df..5a005fd 100644
--- a/src/types/EventTarget.js
+++ b/src/types/EventTarget.js
@@ -9,18 +9,6 @@ export default class EventTarget extends Base {
addEventListener () {}
- // Bind given event to listener
- on (event, listener, binding, options) {
- on(this, event, listener, binding, options)
- return this
- }
-
- // Unbind event from listener
- off (event, listener) {
- off(this, event, listener)
- return this
- }
-
dispatch (event, data) {
return dispatch(this, event, data)
}
@@ -54,5 +42,17 @@ export default class EventTarget extends Base {
return this
}
+ // Unbind event from listener
+ off (event, listener) {
+ off(this, event, listener)
+ return this
+ }
+
+ // Bind given event to listener
+ on (event, listener, binding, options) {
+ on(this, event, listener, binding, options)
+ return this
+ }
+
removeEventListener () {}
}