Issue #99 is caused when compound S commands fail to set the last_command to S. If an S command contains more than one S. The behavior of the smooth curve changes. The first S command is coincident with the current point. However, the second S command is the reflection of the previous control point. The current state of the code only updates the last_command when we change command, which means last_command remains set to M and the behavior remains set to coincident to the current point.
This is also corrected in regebro/svg.path#17 and the source is merely modified to reflect the current state of the svg.path parser (Close and Move pathsegments notwithstanding).
Test coverage is added to prove the functionality of this correction.
Issue #99 is caused when compound S commands fail to set the last_command to
S
. If an S command contains more than one S. The behavior of the smooth curve changes. The firstS
command is coincident with the current point. However, the secondS
command is the reflection of the previous control point. The current state of the code only updates the last_command when we change command, which means last_command remains set toM
and the behavior remains set to coincident to the current point.This is also corrected in regebro/svg.path#17 and the source is merely modified to reflect the current state of the
svg.path
parser (Close and Move pathsegments notwithstanding).Test coverage is added to prove the functionality of this correction.