mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Merge pull request #130 from CyberShadow/opera-fixes
Opera performance fixes
This commit is contained in:
commit
e83de7ae00
@ -285,7 +285,7 @@ _html2canvas.Parse = function ( images, options ) {
|
|||||||
|
|
||||||
text_align = text_align.replace(["-webkit-auto"],["auto"]);
|
text_align = text_align.replace(["-webkit-auto"],["auto"]);
|
||||||
|
|
||||||
if (options.letterRendering === false && /^(left|right|justify|auto)$/.test(text_align) && /^(normal|none)$/.test(letter_spacing)){
|
if (options.letterRendering === false && /^(left|right|justify|auto)$/.test(text_align) && /^(normal|none|0px)$/.test(letter_spacing)){
|
||||||
// this.setContextVariable(ctx,"textAlign",text_align);
|
// this.setContextVariable(ctx,"textAlign",text_align);
|
||||||
renderList = textNode.nodeValue.split(/(\b| )/);
|
renderList = textNode.nodeValue.split(/(\b| )/);
|
||||||
|
|
||||||
@ -363,7 +363,10 @@ _html2canvas.Parse = function ( images, options ) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i < listLen-1)
|
||||||
newTextNode = oldTextNode.splitText(renderList[c].length);
|
newTextNode = oldTextNode.splitText(renderList[c].length);
|
||||||
|
else
|
||||||
|
newTextNode = null;
|
||||||
|
|
||||||
parent = oldTextNode.parentNode;
|
parent = oldTextNode.parentNode;
|
||||||
wrapElement = doc.createElement('wrapper');
|
wrapElement = doc.createElement('wrapper');
|
||||||
|
Loading…
Reference in New Issue
Block a user