Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

Relative subpath uses the wrong starting position #3

@ColaColin

Description

@ColaColin

Given a path like this:
m 0,0 50,0 0,-50 z m 10,10 -50,-20 20,10
the second subpath should start at the location 10,10. Relative to the first position of the previous subpath. The polyfill starts the second subpath at 60,-40. Relative to the last position of the previous path. This breaks svg that rely on such relative positions.

The polyfill needs to track the first position of the current path and use that position to determine the position of a relative next subpath.

Broken example, left is the polyfill, right is the native implementation: http://jsfiddle.net/z1mxLnp7/7/
Hacky fix, implemented without really fully understanding the whole code of the polyfill, so may fail for some datasets I dont use right now: http://jsfiddle.net/z1mxLnp7/6/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions