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

pull module_vmap app_vmap

parents b789776a fd799438
No related branches found
No related tags found
No related merge requests found
...@@ -592,11 +592,11 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.synchronizeMap = func ...@@ -592,11 +592,11 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.synchronizeMap = func
var this_ = this; var this_ = this;
// Synchro Échelle // Synchro Échelle
$(this_.map.getTargetElement()).on('mouseleave', function(){ this_.map.getTargetElement().addEventListener('mouseleave', function(){
oVmap.getMap().getOLMap().on("moveend", this_.updateCompareScaleMap, this_); oVmap.getMap().getOLMap().on("moveend", this_.updateCompareScaleMap, this_);
this_.map.un("moveend", this_.updateScaleMap, this_); this_.map.un("moveend", this_.updateScaleMap, this_);
}); });
$(this_.map.getTargetElement()).on('mouseenter', function(){ this_.map.getTargetElement().addEventListener('mouseenter', function(){
oVmap.getMap().getOLMap().un("moveend", this_.updateCompareScaleMap, this_); oVmap.getMap().getOLMap().un("moveend", this_.updateCompareScaleMap, this_);
this_.map.on("moveend", this_.updateScaleMap, this_); this_.map.on("moveend", this_.updateScaleMap, this_);
}); });
...@@ -664,20 +664,13 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.synchronizeMap = func ...@@ -664,20 +664,13 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.synchronizeMap = func
this_.targetOverlay_.setPosition(convertCoord); this_.targetOverlay_.setPosition(convertCoord);
}); });
// Si la souris n'est pas sur la carte comparée, déclenche un mouseleave
if (!$(this_.map.getTargetElement()).is(':hover')) {
$(this_.map.getTargetElement()).trigger('mouseleave');
}
}; };
/** /**
* Update the map extent with animation * Update the map extent with animation
* @returns {undefined} * @returns {undefined}
*/ */
nsVmap.MapCompare.prototype.mapCompareController.prototype.updateCompareScaleMap = function(e) { nsVmap.MapCompare.prototype.mapCompareController.prototype.updateCompareScaleMap = function(e) { console.log('updateCompareScaleMap');
oVmap.log('nsVmap.MapCompare.updateCompareScaleMap');
var this_ = this var this_ = this
this_.updateCenterCompareMap(); this_.updateCenterCompareMap();
oVmap.getMapCompare().setScale(oVmap.getMap().getScale()); oVmap.getMapCompare().setScale(oVmap.getMap().getScale());
...@@ -689,9 +682,7 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.updateCompareScaleMap ...@@ -689,9 +682,7 @@ nsVmap.MapCompare.prototype.mapCompareController.prototype.updateCompareScaleMap
* Update the map extent with animation * Update the map extent with animation
* @returns {undefined} * @returns {undefined}
*/ */
nsVmap.MapCompare.prototype.mapCompareController.prototype.updateScaleMap = function(e) { nsVmap.MapCompare.prototype.mapCompareController.prototype.updateScaleMap = function(e) { console.log('updateScaleMap');
oVmap.log('nsVmap.MapCompare.updateScaleMap');
var this_ = this var this_ = this
this_.updateCenterMap(); this_.updateCenterMap();
oVmap.getMap().setScale(oVmap.getMapCompare().getScale()); oVmap.getMap().setScale(oVmap.getMapCompare().getScale());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment