on xenial help sign in
don't set left anchor margin twice
2f2147fAlbert Astals
plugins/Dash/CardCreator.js+5−1
@@ -204,9 +204,11 @@ function cardString(template, components) {
204 }
204 }
205 }
205 }
206 var headerLeftAnchor;
206 var headerLeftAnchor;
207+ var headerLeftAnchorHasMagin = false;
207 if (isHorizontal && hasArt) {
208 if (isHorizontal && hasArt) {
208 headerLeftAnchor = 'anchors.left: artShapeHolder.right; \
209 headerLeftAnchor = 'anchors.left: artShapeHolder.right; \
209 anchors.leftMargin: units.gu(1);';
210 anchors.leftMargin: units.gu(1);';
211+ headerLeftAnchorHasMagin = true;
210 } else {
212 } else {
211 headerLeftAnchor = 'anchors.left: parent.left;';
213 headerLeftAnchor = 'anchors.left: parent.left;';
212 }
214 }
@@ -237,8 +239,10 @@ function cardString(template, components) {
237 var anchors = "";
239 var anchors = "";
238 if (!hasHeaderRow) {
240 if (!hasHeaderRow) {
239 anchors += headerLeftAnchor;
241 anchors += headerLeftAnchor;
240− anchors += 'anchors.leftMargin: units.gu(1);'
241 anchors += headerVerticalAnchors;
242 anchors += headerVerticalAnchors;
243+ if (!headerLeftAnchorHasMagin) {
244+ anchors += 'anchors.leftMargin: units.gu(1);'
245+ }
242 } else {
246 } else {
243 anchors = "anchors.verticalCenter: parent.verticalCenter;"
247 anchors = "anchors.verticalCenter: parent.verticalCenter;"
244 }
248 }