on xenial help sign in
Fix GridLayout height sometimes 0.
4a9c732Ying-Chun Liu
plugins/Dash/CardCreator.js+2−2
@@ -564,7 +564,7 @@ function cardString(template, components) {
564 color = 'root.scopeStyle ? root.scopeStyle.foreground : "grey"';
564 color = 'root.scopeStyle ? root.scopeStyle.foreground : "grey"';
565 }
565 }
566
566
567− var summaryTopMargin = (hasMascot || hasSubtitle ? 'anchors.margins' : '0');
567+ var summaryTopMargin = (hasMascot || hasSubtitle || hasAttributes ? 'anchors.margins' : '0');
568
568
569 code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(color);
569 code += kSummaryLabelCode.arg(summaryTopAnchor).arg(summaryTopMargin).arg(color);
570 }
570 }
@@ -576,7 +576,7 @@ function cardString(template, components) {
576 } else if (hasMascot) {
576 } else if (hasMascot) {
577 code += 'implicitHeight: mascotImage.y + mascotImage.height;\n';
577 code += 'implicitHeight: mascotImage.y + mascotImage.height;\n';
578 } else if (hasAttributes) {
578 } else if (hasAttributes) {
579− code += 'implicitHeight: attributesRow.y + attributesRow.height + units.gu(1);\n';
579+ code += 'implicitHeight: attributesRow.y + Math.max(attributesRow.height, attributesRow.childrenRect.height, attributesRow.implicitHeight, units.gu(2)) + units.gu(1);\n';
580 } else if (hasSubtitle) {
580 } else if (hasSubtitle) {
581 code += 'implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
581 code += 'implicitHeight: subtitleLabel.y + subtitleLabel.height + units.gu(1);\n';
582 } else if (hasTitle) {
582 } else if (hasTitle) {