diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-12 14:51:34 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-12 14:51:34 +0100 |
commit | bf6e2aeb13f9a4bee2be1f8f7a70ca1a73215245 (patch) | |
tree | 0614edfac92e0ab9ff44144b79aa5802211ef5e0 /src/elements | |
parent | 334d9c73c2f74679a93b1d7b3e39b614f6444faa (diff) | |
download | svg.js-bf6e2aeb13f9a4bee2be1f8f7a70ca1a73215245.tar.gz svg.js-bf6e2aeb13f9a4bee2be1f8f7a70ca1a73215245.zip |
remove native() methods, add methods of types directly to elemenet
Diffstat (limited to 'src/elements')
-rw-r--r-- | src/elements/Dom.js | 5 | ||||
-rw-r--r-- | src/elements/Element.js | 15 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/elements/Dom.js b/src/elements/Dom.js index 6d35f1e..55d5858 100644 --- a/src/elements/Dom.js +++ b/src/elements/Dom.js @@ -137,11 +137,6 @@ export default class Dom extends EventTarget { return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector) } - // Returns the svg node to call native svg methods on it - native () { - return this.node - } - // Returns the parent element instance parent (type) { var parent = this diff --git a/src/elements/Element.js b/src/elements/Element.js index 3b96bf4..456ddad 100644 --- a/src/elements/Element.js +++ b/src/elements/Element.js @@ -1,5 +1,14 @@ -import { getClass, makeInstance, register, root } from '../utils/adopter.js' +import { bbox, rbox } from '../types/Box.js' +import { ctm, screenCTM } from '../types/Matrix.js' +import { + extend, + getClass, + makeInstance, + register, + root +} from '../utils/adopter.js' import { globals } from '../utils/window.js' +import { point } from '../types/Point.js' import { proportionalSize } from '../utils/utils.js' import { reference } from '../modules/core/regex.js' import Dom from './Dom.js' @@ -145,4 +154,8 @@ export default class Element extends Dom { } } +extend(Element, { + bbox, rbox, point, ctm, screenCTM +}) + register(Element) |