Commit 1b3d0e91 authored by Julie Blanc's avatar Julie Blanc

delete console log

parent 96285274
...@@ -832,42 +832,24 @@ class AtPage extends Handler { ...@@ -832,42 +832,24 @@ class AtPage extends Handler {
if (center) { if (center) {
console.log(marginGroup);
//marginGroup.style["grid-template-columns"] = "1fr 300px 1fr";
centerWidth = window.getComputedStyle(center)["max-width"]; centerWidth = window.getComputedStyle(center)["max-width"];
if(centerWidth === "none" || centerWidth === "auto") { if(centerWidth === "none" || centerWidth === "auto") {
/* center computed auto */
console.log("Center auto");
if(!leftContent && !rightContent){ if(!leftContent && !rightContent){
console.log("center only");
marginGroup.style["grid-template-columns"] = "0 1fr 0"; marginGroup.style["grid-template-columns"] = "0 1fr 0";
}else if(leftContent){{} }else if(leftContent){{}
if(!rightContent){ if(!rightContent){
console.log("left + center");
if(leftWidth !== "none" && leftWidth !== "auto"){ if(leftWidth !== "none" && leftWidth !== "auto"){
console.log("left size + center auto");
marginGroup.style["grid-template-columns"] = leftWidth + " 1fr " + leftWidth; marginGroup.style["grid-template-columns"] = leftWidth + " 1fr " + leftWidth;
} }
}else{ }else{
console.log("left + center auto + right");
if(leftWidth !== "none" && leftWidth !== "auto"){ if(leftWidth !== "none" && leftWidth !== "auto"){
if(rightWidth !== "none" && rightWidth !== "auto"){ if(rightWidth !== "none" && rightWidth !== "auto"){
console.log("left size + center auto + right size");
marginGroup.style["grid-template-columns"] = leftWidth + " 1fr " + rightWidth; marginGroup.style["grid-template-columns"] = leftWidth + " 1fr " + rightWidth;
}else{ }else{
console.log("left size + center auto + right auto");
marginGroup.style["grid-template-columns"] = leftWidth + " 1fr " + leftWidth; marginGroup.style["grid-template-columns"] = leftWidth + " 1fr " + leftWidth;
} }
}else{ }else{
console.log("left auto + center auto + right");
if(rightWidth !== "none" && rightWidth !== "auto"){ if(rightWidth !== "none" && rightWidth !== "auto"){
marginGroup.style["grid-template-columns"] = rightWidth + " 1fr " + rightWidth; marginGroup.style["grid-template-columns"] = rightWidth + " 1fr " + rightWidth;
} }
...@@ -875,22 +857,13 @@ class AtPage extends Handler { ...@@ -875,22 +857,13 @@ class AtPage extends Handler {
} }
}else{ }else{
if(rightWidth !== "none" && rightWidth !== "auto"){ if(rightWidth !== "none" && rightWidth !== "auto"){
console.log("none + center auto + right size");
marginGroup.style["grid-template-columns"] = rightWidth + " 1fr " + rightWidth; marginGroup.style["grid-template-columns"] = rightWidth + " 1fr " + rightWidth;
} }
} }
}else if(centerWidth !== "none" && centerWidth !== "auto"){ }else if(centerWidth !== "none" && centerWidth !== "auto"){
/* center computed size */
console.log("Center size");
if(leftContent && leftWidth !== "none" && leftWidth !== "auto"){ if(leftContent && leftWidth !== "none" && leftWidth !== "auto"){
console.log("left size + center size");
marginGroup.style["grid-template-columns"] = leftWidth + " " + centerWidth + " 1fr"; marginGroup.style["grid-template-columns"] = leftWidth + " " + centerWidth + " 1fr";
}else if(rightContent && rightWidth !== "none" && rightWidth !== "auto"){ }else if(rightContent && rightWidth !== "none" && rightWidth !== "auto"){
console.log("left size + right size");
marginGroup.style["grid-template-columns"] = "1fr " + centerWidth + " " + rightWidth; marginGroup.style["grid-template-columns"] = "1fr " + centerWidth + " " + rightWidth;
}else{ }else{
marginGroup.style["grid-template-columns"] = "1fr " + centerWidth + " 1fr"; marginGroup.style["grid-template-columns"] = "1fr " + centerWidth + " 1fr";
...@@ -926,7 +899,6 @@ class AtPage extends Handler { ...@@ -926,7 +899,6 @@ class AtPage extends Handler {
} }
} }
// }
}); });
// check middle // check middle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment