File tree 4 files changed +19
-6
lines changed
4 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -685,8 +685,12 @@ function filters(
685
685
( isSafeToUseZ || next ?. command === 'Z' || next ?. command === 'z' ) &&
686
686
( command === 'l' || command === 'h' || command === 'v' )
687
687
) {
688
- // @ts -ignore
689
- if ( pathBase [ 0 ] === item . coords [ 0 ] && pathBase [ 1 ] === item . coords [ 1 ] ) {
688
+ if (
689
+ // @ts -ignore
690
+ Math . abs ( pathBase [ 0 ] - item . coords [ 0 ] ) < error &&
691
+ // @ts -ignore
692
+ Math . abs ( pathBase [ 1 ] - item . coords [ 1 ] ) < error
693
+ ) {
690
694
command = 'z' ;
691
695
data = [ ] ;
692
696
}
@@ -839,9 +843,9 @@ function filters(
839
843
params . removeUseless &&
840
844
isSafeToUseZ &&
841
845
// @ts -ignore
842
- item . base [ 0 ] === item . coords [ 0 ] &&
846
+ Math . abs ( item . base [ 0 ] - item . coords [ 0 ] ) < error / 10 &&
843
847
// @ts -ignore
844
- item . base [ 1 ] === item . coords [ 1 ]
848
+ Math . abs ( item . base [ 1 ] - item . coords [ 1 ] ) < error / 10
845
849
)
846
850
return false ;
847
851
You can’t perform that action at this time.
0 commit comments