Browse Source

Revert back setHfov(i) changes

pull/14/head
PhobosK 10 years ago
parent
commit
574363cc20
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      src/js/pannellum.js

+ 10
- 1
src/js/pannellum.js View File

@@ -869,7 +869,16 @@ function zoomOut(amount) {

function setHfov(i) {
// Keep field of view within bounds
config.hfov = Math.max(config.minhfov, Math.min(config.maxhfov, i));
if (i < config.minhfov && config.type != 'multires') {
config.hfov = config.minhfov;
} else if (config.type == 'multires' && i < canvas.width
/ (config.multiRes.cubeResolution / 90 * 0.9)) {
config.hfov = canvas.width / (config.multiRes.cubeResolution / 90 * 0.9);
} else if (i > config.maxhfov) {
config.hfov = config.maxhfov;
} else {
config.hfov = i;
}
}

function load() {


Loading…
Cancel
Save