This commit is contained in:
Niklas von Hertzen 2011-08-11 15:35:02 +03:00
parent dcd2a03f79
commit be241066ce
2 changed files with 20 additions and 19 deletions

View File

@ -289,7 +289,7 @@ html2canvas.prototype.canvasRenderer = function(queue){
* Sort elements based on z-index and position attributes
*/
/*
html2canvas.prototype.sortQueue = function(queue){
if (!this.opts.reorderZ || !this.needReorder) return queue;
@ -327,16 +327,11 @@ html2canvas.prototype.sortQueue = function(queue){
});
/*
console.log('after');
this.each(queue,function(i,e){
console.log(i+":"+e.zIndex);
// console.log(e.ctx.storage);
}); */
return queue;
}
*/
html2canvas.prototype.setContextVariable = function(ctx,variable,value){
if (!ctx.storage){

View File

@ -168,14 +168,20 @@ html2canvas.prototype.sortZ = function(zStack){
subStacks.push(stackChild);
stackValues.push(stackChild.zindex);
}else{
_.queue.push(stackChild);
}
});
stackValues.sort(function(a,b){return a - b});
stackValues.sort(function(a,b){
return a - b
});
this.each(stackValues, function(i,zValue){
for (var s = 0;s<=subStacks.length;s++){