mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
cleanup
This commit is contained in:
parent
dcd2a03f79
commit
be241066ce
@ -289,7 +289,7 @@ html2canvas.prototype.canvasRenderer = function(queue){
|
|||||||
* Sort elements based on z-index and position attributes
|
* Sort elements based on z-index and position attributes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
html2canvas.prototype.sortQueue = function(queue){
|
html2canvas.prototype.sortQueue = function(queue){
|
||||||
if (!this.opts.reorderZ || !this.needReorder) return 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;
|
return queue;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
html2canvas.prototype.setContextVariable = function(ctx,variable,value){
|
html2canvas.prototype.setContextVariable = function(ctx,variable,value){
|
||||||
if (!ctx.storage){
|
if (!ctx.storage){
|
||||||
|
30
src/Util.js
30
src/Util.js
@ -168,24 +168,30 @@ html2canvas.prototype.sortZ = function(zStack){
|
|||||||
subStacks.push(stackChild);
|
subStacks.push(stackChild);
|
||||||
stackValues.push(stackChild.zindex);
|
stackValues.push(stackChild.zindex);
|
||||||
}else{
|
}else{
|
||||||
_.queue.push(stackChild);
|
|
||||||
|
|
||||||
|
_.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){
|
this.each(stackValues, function(i,zValue){
|
||||||
for (var s = 0;s<=subStacks.length;s++){
|
for (var s = 0;s<=subStacks.length;s++){
|
||||||
if (subStacks[s].zindex == zValue){
|
if (subStacks[s].zindex == zValue){
|
||||||
var stackChild = subStacks.splice(s,1);
|
var stackChild = subStacks.splice(s,1);
|
||||||
_.sortZ(stackChild[0]);
|
_.sortZ(stackChild[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user