Skip to content

Commit 3c134d4

Browse files
committed
move lastTextWasStroke flag into page context
1 parent 298c743 commit 3c134d4

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

jspdf.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,7 @@ var jsPDF = (function(global) {
200200
},
201201
API = {},
202202
events = new PubSub(API),
203-
lastTextWasStroke = false,
204-
203+
205204
/////////////////////
206205
// Private functions
207206
/////////////////////
@@ -1134,17 +1133,18 @@ var jsPDF = (function(global) {
11341133
//TODO this might not work after object block changes
11351134
// It would be better to pass in a page context
11361135
var strokeOption = '';
1136+
var pageContext = getCurrentPageInfo().pageContext;
11371137
if (true === flags.stroke){
1138-
if (this.lastTextWasStroke !== true){
1138+
if (pageContext.lastTextWasStroke !== true){
11391139
strokeOption = '1 Tr\n';
1140-
this.lastTextWasStroke = true;
1140+
pageContext.lastTextWasStroke = true;
11411141
}
11421142
}
11431143
else{
1144-
if (this.lastTextWasStroke){
1144+
if (pageContext.lastTextWasStroke){
11451145
strokeOption = '0 Tr\n';
11461146
}
1147-
this.lastTextWasStroke = false;
1147+
pageContext.lastTextWasStroke = false;
11481148
}
11491149

11501150
if (text instanceof Array) {

0 commit comments

Comments
 (0)