Browse Source

Merge branch 'rezine-style' of ssh://code.ffdn.org:55555/FFDN/celutz into rezine-style

julpec 8 years ago
parent
commit
8cf42718a7
1 changed files with 3 additions and 3 deletions
  1. 3 3
      panorama/static/panorama/js/pano.js

+ 3 - 3
panorama/static/panorama/js/pano.js

@@ -753,7 +753,6 @@ function change_angle() {
     var pos_x = resxy.x;
     var pos_y = Math.floor(zm.im.height/2 - resxy.y);
     putImage(pos_x, pos_y);
-    //update_map(); // Doesn't work on first load...
 }
 
 function check_prox(x, y, r) {   //verification si un point de coordonnées x, y est bien dans un cercle de rayon r centré en X,Y.
@@ -1079,8 +1078,9 @@ function load_pano() {
 
     angle_control = document.getElementById("angle_ctrl");
     angle_control.value = initial_orientation.cap;
-    angle_control.onchange = change_angle;
-    angle_control.onclick = change_angle;
+    angle_control.addEventListener('change', change_angle, false);
+    angle_control.addEventListener('change', update_map, false);
+    angle_control.addEventListener('onclick', change_angle, false);
     elvtn_control = document.getElementById("elvtn_ctrl");
     elvtn_control.value = initial_orientation.elevation;
     elvtn_control.onchange = change_angle;