File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -626,18 +626,19 @@ function filters(
626
626
data [ 6 ] += item . base [ 1 ] - relSubpoint [ 1 ] ;
627
627
}
628
628
// Correct l commands heading home
629
- if ( command == 'l' ) {
630
- if (
631
- // @ts -expect-error
632
- Math . abs ( item . coords [ 0 ] - pathBase [ 0 ] ) < error &&
633
- // @ts -expect-error
634
- Math . abs ( item . coords [ 1 ] - pathBase [ 1 ] ) < error
635
- ) {
636
- // @ts -expect-error
637
- data [ 0 ] = pathBase [ 0 ] - item . base [ 0 ] ;
638
- // @ts -expect-error
639
- data [ 1 ] = pathBase [ 1 ] - item . base [ 1 ] ;
640
- }
629
+ if (
630
+ command == 'l' &&
631
+ prev . command != 'M' &&
632
+ prev . command != 'm' &&
633
+ // @ts -expect-error
634
+ Math . abs ( item . coords [ 0 ] - pathBase [ 0 ] ) < error &&
635
+ // @ts -expect-error
636
+ Math . abs ( item . coords [ 1 ] - pathBase [ 1 ] ) < error
637
+ ) {
638
+ // @ts -expect-error
639
+ data [ 0 ] = pathBase [ 0 ] - item . base [ 0 ] ;
640
+ // @ts -expect-error
641
+ data [ 1 ] = pathBase [ 1 ] - item . base [ 1 ] ;
641
642
}
642
643
roundData ( data ) ;
643
644
You can’t perform that action at this time.
0 commit comments