Browse Source

Fix 26a271f1 for 360° images

We were not taking into account 360° images.
Baptiste Jonglez 9 years ago
parent
commit
13a4694eb7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panorama/static/panorama/js/pano.js

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

@@ -660,7 +660,7 @@ function tzoom(zv) {
 		    var px = this.ref_pixels[i].x + this.ref_pixels[i].ratio_x*fmodulo(cap - this.ref_pixels[i].cap, 360);
 		    var px = this.ref_pixels[i].x + this.ref_pixels[i].ratio_x*fmodulo(cap - this.ref_pixels[i].cap, 360);
 		    var dpix = px-this.ref_pixels[i].x;
 		    var dpix = px-this.ref_pixels[i].x;
 		    var py = this.pixel_y_ratio*ele - this.ref_pixels[i].shift_y - this.ref_pixels[i].dshft_y*dpix;
 		    var py = this.pixel_y_ratio*ele - this.ref_pixels[i].shift_y - this.ref_pixels[i].dshft_y*dpix;
-                    if (dcap < fmodulo(alpha_domain.end - alpha_domain.start, 360))
+                    if (image_loop || (dcap < fmodulo(alpha_domain.end - alpha_domain.start, 360)))
                         // Position is inside the view
                         // Position is inside the view
 		        return {x: px, y: py};
 		        return {x: px, y: py};
                     else {
                     else {