AndroidIconAnimator icon indicating copy to clipboard operation
AndroidIconAnimator copied to clipboard

SVG importing bug with multiple 'm' and 'Z' commands

Open alexjlockwood opened this issue 8 years ago • 0 comments

I think before the break statement here: https://github.com/romannurik/AndroidIconAnimator/blob/695b10f0bcc0775369a2d14b0c39994a31ab45f7/app/scripts/SvgPathData.js#L601

You need to keep track of a point variable lastMovePoint and add the line:

currentPoint = Object.assign({}, lastMovePoint);

Otherwise a path such as m 1,1 2,2 3,3 Z m 1,1 2,2 3,3 Z won't import properly (specifically, the second relative 'm' command will use 3,3 as its current point, when really it should be using 1,1).

alexjlockwood avatar Feb 23 '17 01:02 alexjlockwood