mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
stacking context creator should be at the bottom
passes z-index12. issue #256
This commit is contained in:
parent
dd7468c446
commit
564634ba97
@ -15,12 +15,10 @@ _html2canvas.Renderer = function(parseQueue, options){
|
|||||||
stub = {node: node},
|
stub = {node: node},
|
||||||
childrenDest = specialParent; // where children without z-index should be pushed into
|
childrenDest = specialParent; // where children without z-index should be pushed into
|
||||||
|
|
||||||
if (!context[zi]) { context[zi] = []; }
|
|
||||||
if (node.zIndex.ownStacking) {
|
if (node.zIndex.ownStacking) {
|
||||||
contextForChildren = stub.context = { 0: [{node:node}]};
|
// '!' comes before numbers in sorted array
|
||||||
if (isPositioned || isFloated) {
|
contextForChildren = stub.context = { '!': [{node:node, children: []}]};
|
||||||
childrenDest = contextForChildren[0][0].children = [];
|
childrenDest = undefined;
|
||||||
}
|
|
||||||
} else if (isPositioned || isFloated) {
|
} else if (isPositioned || isFloated) {
|
||||||
childrenDest = stub.children = [];
|
childrenDest = stub.children = [];
|
||||||
}
|
}
|
||||||
@ -28,6 +26,7 @@ _html2canvas.Renderer = function(parseQueue, options){
|
|||||||
if (zi === 0 && specialParent) {
|
if (zi === 0 && specialParent) {
|
||||||
specialParent.push(stub);
|
specialParent.push(stub);
|
||||||
} else {
|
} else {
|
||||||
|
if (!context[zi]) { context[zi] = []; }
|
||||||
context[zi].push(stub);
|
context[zi].push(stub);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user