diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2020-05-04 21:35:21 +1000 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2020-05-04 21:35:21 +1000 |
commit | c8cb22863bf8c3ac157f6098be9154908aea9ec2 (patch) | |
tree | b27b1bf6ec4c90bbd0cb335e26bb9ece504285d2 /src/types/PathArray.js | |
parent | 59f09a1a2317e57d13bbe8f60e1949cc82199ead (diff) | |
download | svg.js-c8cb22863bf8c3ac157f6098be9154908aea9ec2.tar.gz svg.js-c8cb22863bf8c3ac157f6098be9154908aea9ec2.zip |
Fixed IE Polyfills, got rid of ArrayPolyfill in favour of babels own transforms, updated dependencies, finished tests, removed old es5 tests
Diffstat (limited to 'src/types/PathArray.js')
-rw-r--r-- | src/types/PathArray.js | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/types/PathArray.js b/src/types/PathArray.js index 03fdee3..d9c1eb2 100644 --- a/src/types/PathArray.js +++ b/src/types/PathArray.js @@ -6,17 +6,11 @@ import { numbersWithDots, pathLetters } from '../modules/core/regex.js' -import { extend } from '../utils/adopter.js' -import { subClassArray } from './ArrayPolyfill.js' import Point from './Point.js' import SVGArray from './SVGArray.js' import parser from '../modules/core/parser.js' import Box from './Box.js' -const PathArray = subClassArray('PathArray', SVGArray) - -export default PathArray - export function pathRegReplace (a, b, c, d) { return c + d.replace(dots, ' .') } @@ -130,11 +124,11 @@ for (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) { })(mlhvqtcsaz[i].toUpperCase()) } -extend(PathArray, { +export default class PathArray extends SVGArray { // Convert array to string toString () { return arrayToString(this) - }, + } // Move path string move (x, y) { @@ -175,7 +169,7 @@ extend(PathArray, { } return this - }, + } // Resize path string size (width, height) { @@ -221,7 +215,7 @@ extend(PathArray, { } return this - }, + } // Absolutize and parse path to array parse (array = [ 'M', 0, 0 ]) { @@ -268,11 +262,11 @@ extend(PathArray, { } while (len > index) return result - }, + } // Get bounding box of path bbox () { parser().path.setAttribute('d', this.toString()) return new Box(parser.nodes.path.getBBox()) } -}) +} |