Don't create zero-width text node after each render

This fixes rendering the same node getting slower each time
when using Opera.
This commit is contained in:
Vladimir Panteleev 2012-10-20 22:15:58 +03:00
parent 81ae37cbd1
commit 3164e5bae0

View File

@ -363,7 +363,10 @@ _html2canvas.Parse = function ( images, options ) {
continue;
}
newTextNode = oldTextNode.splitText(renderList[c].length);
if (i < listLen-1)
newTextNode = oldTextNode.splitText(renderList[c].length);
else
newTextNode = null;
parent = oldTextNode.parentNode;
wrapElement = doc.createElement('wrapper');