diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-12-12 23:21:10 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-12-12 23:21:10 +0100 |
commit | 33e82b796e7870a9523b6e9653877a2613f8f7a2 (patch) | |
tree | 7450136c1178008d9ba17bc2408ee5f43c71e9c4 /src/elements/Element.js | |
parent | 7b02d60829d1151a9fd1e726a0a995b92b165328 (diff) | |
download | svg.js-33e82b796e7870a9523b6e9653877a2613f8f7a2.tar.gz svg.js-33e82b796e7870a9523b6e9653877a2613f8f7a2.zip |
Release 3.0.53.0.5
Diffstat (limited to 'src/elements/Element.js')
-rw-r--r-- | src/elements/Element.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/elements/Element.js b/src/elements/Element.js index 594daa1..ba15f52 100644 --- a/src/elements/Element.js +++ b/src/elements/Element.js @@ -55,6 +55,16 @@ export default class Element extends Dom { return this.root().defs() } + // Relative move over x axis + dx (x) { + return this.x(new SVGNumber(x).plus(this.x())) + } + + // Relative move over y axis + dy (y) { + return this.y(new SVGNumber(y).plus(this.y())) + } + // Get parent document root () { let p = this.parent(Svg) |