on xenial help sign in
Combine the ifs
commit5f33e7188b8989ca997aeb6cc7acc87e057f3e14 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 24 Aug 2016, 17:49 (10 years ago) parentb48dd3f
1 file changed+1−3
plugins/Dash/CardCreator.js+1−3
plugins/Dash/CardCreator.js+1−3
@@ -506,12 +506,10 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
506506 }
507507
508508 if (hasArt) {
509+ var artShapeAspect;
509510 if (isCardTool) {
510511 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
511− }
512512
513− var artShapeAspect;
514− if (isCardTool) {
515513 var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
516514 if (isNaN(artShapeAspect)) {
517515 artShapeAspect = 1;