Skip to content

Commit

Permalink
Update README for getPathSegAtLength polyfill
Browse files Browse the repository at this point in the history
Update the main README to mention that getPathSegAtLength is now polyfilled as well (see: issue 17).
  • Loading branch information
progers authored Apr 24, 2017
1 parent 11a4c15 commit 461fd5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SVGPathSeg polyfill

This is a drop-in replacement for the SVGPathSeg and SVGPathSegList APIs that were removed from SVG2 (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html). Existing code that uses the SVGPathSeg or SVGPathSegList APIs can use this polyfill to keep working. This polyfill is based on the exact code and tests that were removed from Chromium 47.
This is a drop-in replacement for the SVGPathSeg, SVGPathSegList, and getPathSegAtLength APIs that were removed from SVG2 (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html). Existing code that uses the SVGPathSeg or SVGPathSegList APIs can use this polyfill to keep working. This polyfill is based on the exact code and tests that were removed from Chromium 47.

The SVGPathSeg API was difficult to use and has been removed from the SVG spec in favor of a new, awesomer API in the Paths module (https://lists.w3.org/Archives/Public/www-svg/2015Jun/0044.html). All new development should use the SVG Path Data API. There's a polyfill ([path-data-polyfill.js](https://github.com/jarek-foksa/path-data-polyfill.js)) for browsers that do not yet support the new API.

Expand All @@ -10,6 +10,8 @@ Now passing all SVGPathSeg tests from the Chromium repository.

Now used by [svg-edit](https://github.com/SVG-Edit/svgedit) and passes all svg-edit path tests.

Blink will likely remove SVGPathElement.getPathSegAtLength (see: [Intent to deprecate and remove SVGPathElement.getPathSegAtLength](https://groups.google.com/a/chromium.org/d/msg/blink-dev/Gc1Aw282beo/NsfsKf8LBgAJ)). A getPathSegAtLength polyfill has been added to this library.

## Using pathseg.js
Just add pathseg.js to your server and drop this in your html or svg files:
```
Expand All @@ -34,3 +36,5 @@ These APIs have been removed from SVG 2 but their original definitions can be fo
http://www.w3.org/TR/SVG/single-page.html#paths-InterfaceSVGPathSeg

http://www.w3.org/TR/SVG/single-page.html#paths-InterfaceSVGPathSegList

https://www.w3.org/TR/SVG/single-page.html#paths-__svg__SVGPathElement__getPathSegAtLength

0 comments on commit 461fd5f

Please sign in to comment.