on xenial help sign in
Combine the ifs
5f33e71Albert Astals Cid
plugins/Dash/CardCreator.js+1−3
@@ -506,12 +506,10 @@ function cardString(template, components, isCardTool, artShapeStyle, categoryLay
506 }
506 }
507
507
508 if (hasArt) {
508 if (hasArt) {
509+ var artShapeAspect;
509 if (isCardTool) {
510 if (isCardTool) {
510 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
511 code += 'readonly property size artShapeSize: artShapeLoader.item ? Qt.size(artShapeLoader.item.width, artShapeLoader.item.height) : Qt.size(-1, -1);\n';
511− }
512
512
513− var artShapeAspect;
514− if (isCardTool) {
515 var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
513 var artShapeAspect = components["art"] && components["art"]["aspect-ratio"] || 1;
516 if (isNaN(artShapeAspect)) {
514 if (isNaN(artShapeAspect)) {
517 artShapeAspect = 1;
515 artShapeAspect = 1;