Support \\n
This commit is contained in:
parent
b5d8cf5e3f
commit
e56b92d78e
@ -3931,6 +3931,10 @@ core.prototype.splitLines = function(canvas, text, maxLength, font) {
|
|||||||
contents.push(text.substring(last, i));
|
contents.push(text.substring(last, i));
|
||||||
last=i+1;
|
last=i+1;
|
||||||
}
|
}
|
||||||
|
else if (text.charAt(i)=='\\' && text.charAt(i+1)=='n') {
|
||||||
|
contents.push(text.substring(last, i));
|
||||||
|
last=i+2;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
var toAdd = text.substring(last, i+1);
|
var toAdd = text.substring(last, i+1);
|
||||||
var width = core.canvas[canvas].measureText(toAdd).width;
|
var width = core.canvas[canvas].measureText(toAdd).width;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user