diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 10:05:28 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 10:05:28 +0100 |
commit | 4702522137dac17a6312c521f3c1974eb839c5eb (patch) | |
tree | 97c158c2c4e8005d3e56e037eab16dfffcf3da42 /src/types | |
parent | dec70426b32ccf3979046e1637174b66bfdd1a8d (diff) | |
download | svg.js-4702522137dac17a6312c521f3c1974eb839c5eb.tar.gz svg.js-4702522137dac17a6312c521f3c1974eb839c5eb.zip |
added insertAfter/Before, introduce attrHooks, move few methods, SVG.Text.textPath returns first textPath child now
Diffstat (limited to 'src/types')
-rw-r--r-- | src/types/EventTarget.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/types/EventTarget.js b/src/types/EventTarget.js index a32a1f1..31d01df 100644 --- a/src/types/EventTarget.js +++ b/src/types/EventTarget.js @@ -1,5 +1,4 @@ import { dispatch, off, on } from '../modules/core/event.js' -import { registerMethods } from '../utils/methods.js' import Base from './Base.js' export default class EventTarget extends Base { @@ -57,34 +56,3 @@ export default class EventTarget extends Base { removeEventListener () {} } - -// Add events to elements -const methods = [ 'click', - 'dblclick', - 'mousedown', - 'mouseup', - 'mouseover', - 'mouseout', - 'mousemove', - 'mouseenter', - 'mouseleave', - 'touchstart', - 'touchmove', - 'touchleave', - 'touchend', - 'touchcancel' ].reduce(function (last, event) { - // add event to Element - const fn = function (f) { - if (f === null) { - off(this, event) - } else { - on(this, event, f) - } - return this - } - - last[event] = fn - return last -}, {}) - -registerMethods('Element', methods) |