File tree Expand file tree Collapse file tree 2 files changed +38
-4
lines changed Expand file tree Collapse file tree 2 files changed +38
-4
lines changed Original file line number Diff line number Diff line change
1
+ #Hotfixes
2
+
3
+ We sometimes bake-in solutions (A.K.A. hotfixes) to solve issues for specific use cases.
4
+
5
+ When we deem a hotfix will not break existing code,
6
+ will make it default behaviour and mark the hotfix as _ accepted_ ,
7
+ At that point the define can be removed.
8
+
9
+ To enable a hotfix, define the following member of your created PDF,
10
+ where the pdf.hotfix field is the name of the hotfix.
11
+
12
+ var pdf new jsPDF(...);
13
+ pdf.hotfix.fill_close = true;
14
+
15
+ #Active Hotfixes
16
+
17
+ ##fill_close
18
+ ###Applies To
19
+ context2d plugin
20
+
21
+ ### Affects
22
+ Filling paths
23
+
24
+ ### Description
25
+ In certain cases, closing a fill would result in a path resolving to an incorrect point.
26
+ The was most likely fixed when we refactored matrix logic. Enabling this hotfix will ignore a most-likely unneeded workaround.
27
+
28
+ #Accepted Hotfixes
29
+ There a currently no accepted hotfixes.
Original file line number Diff line number Diff line change 1143
1143
}
1144
1144
}
1145
1145
1146
- // extra move bug causing close to resolve to wrong point
1147
- var x = moves [ i ] . start . x ;
1148
- var y = moves [ i ] . start . y ;
1149
- this . internal . line2 ( c2d , x , y ) ;
1146
+ if ( this . pdf . hotfix && this . pdf . hotfix . fill_close ) {
1147
+ // do nothing
1148
+ }
1149
+ else {
1150
+ // extra move bug causing close to resolve to wrong point
1151
+ var x = moves [ i ] . start . x ;
1152
+ var y = moves [ i ] . start . y ;
1153
+ this . internal . line2 ( c2d , x , y ) ;
1154
+ }
1150
1155
1151
1156
this . pdf . internal . out ( 'h' ) ;
1152
1157
this . pdf . internal . out ( 'f' ) ;
You can’t perform that action at this time.
0 commit comments