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/modules | |
parent | 7b02d60829d1151a9fd1e726a0a995b92b165328 (diff) | |
download | svg.js-33e82b796e7870a9523b6e9653877a2613f8f7a2.tar.gz svg.js-33e82b796e7870a9523b6e9653877a2613f8f7a2.zip |
Release 3.0.53.0.5
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/core/parser.js | 4 | ||||
-rw-r--r-- | src/modules/optional/sugar.js | 14 |
2 files changed, 4 insertions, 14 deletions
diff --git a/src/modules/core/parser.js b/src/modules/core/parser.js index 1ff2380..dfa7b7b 100644 --- a/src/modules/core/parser.js +++ b/src/modules/core/parser.js @@ -5,7 +5,7 @@ export default function parser () { // Reuse cached element if possible if (!parser.nodes) { let svg = makeInstance().size(2, 0) - svg.node.cssText = [ + svg.node.style.cssText = [ 'opacity: 0', 'position: absolute', 'left: -100%', @@ -13,6 +13,8 @@ export default function parser () { 'overflow: hidden' ].join(';') + svg.attr('focusable', 'false') + let path = svg.path().node parser.nodes = { svg, path } diff --git a/src/modules/optional/sugar.js b/src/modules/optional/sugar.js index d4255c3..c05512d 100644 --- a/src/modules/optional/sugar.js +++ b/src/modules/optional/sugar.js @@ -38,7 +38,7 @@ var sugar = { return this } - registerMethods([ 'Shape', 'Runner' ], extension) + registerMethods([ 'Element', 'Runner' ], extension) }) registerMethods([ 'Element', 'Runner' ], { @@ -110,18 +110,6 @@ registerMethods([ 'Element', 'Runner' ], { } }) -registerMethods('Element', { - // Relative move over x axis - dx: function (x) { - return this.x(new SVGNumber(x).plus(this.x())) - }, - - // Relative move over y axis - dy: function (y) { - return this.y(new SVGNumber(y).plus(this.y())) - } -}) - registerMethods('radius', { // Add x and y radius radius: function (x, y) { |