Skip to content
Snippets Groups Projects
Commit 772b3e0a authored by Armand Bahi's avatar Armand Bahi
Browse files

Bug impressions comparaison : scope.compare_mode not interpreted

parent da914e96
No related branches found
No related tags found
No related merge requests found
......@@ -379,7 +379,7 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.loadModelParmas2
this.printBox_.show();
if(this.$scope_["$root"]["compare_enabled"]){
this.oComparePrintMapSize = this.getPrintedMapSize(this.template_,"#map1Compare","#map_image_compare");
this.oComparePrintMapSize = this.getPrintedMapSize(this.template_, "#map1Compare", "#map_image_compare");
if(this.oComparePrintMapSize !== 0){
// Pré-rempli le champ "Résolution"
this['resolutionCompare'] = this.oComparePrintMapSize.resizeCoeff;
......@@ -395,6 +395,8 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.loadModelParmas2
}
}
// Supprime le template du body de Vmap
$(this.template_).remove();
};
/**
......@@ -420,11 +422,18 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.setTemplate = fu
});
}
this.$scope_['compare_mode'] = this.$scope_["$root"]["compare_enabled"];
if (goog.isDefAndNotNull(oModel['definition'])) {
var template = document.createElement("div");
template.innerHTML = oModel['definition'];
this.$compile_(template)(this.$scope_);
this_.template_ = template;
callback.call(this, [template]);
setTimeout(function () {
callback.call(this_, [template]);
});
}
};
......@@ -450,6 +459,8 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.getPrintedMapSiz
return 0;
}
oPrintScope = angular.element($(template).find(sPrintId)).scope();
// Ajoute temporairement le template au body de Vmap
$(template).addClass('print_template');
$('body').append(template);
......@@ -457,9 +468,6 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.getPrintedMapSiz
var mapHeight = imageDiv.height();
var mapWidth = imageDiv.width();
// Supprime le template du body de Vmap
$(template).remove();
// Vérifie si la taille de la carte est suppérieur à la taille de l'écran
var resizeCoeff = 1;
var tmpWidth = angular.copy(mapWidth);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment