From 6fe51935c83d26d0e7ac4ccbb0ebf957835012c6 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Fri, 16 Aug 2019 10:15:47 -0400 Subject: [PATCH] Fix behavior of `multiResMinHfov` to match docs (fixes #783). --- src/js/pannellum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 9bce419..9450043 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -2191,7 +2191,7 @@ function zoomOut() { function constrainHfov(hfov) { // Keep field of view within bounds var minHfov = config.minHfov; - if (config.type == 'multires' && renderer && config.multiResMinHfov) { + if (config.type == 'multires' && renderer && !config.multiResMinHfov) { minHfov = Math.min(minHfov, renderer.getCanvas().width / (config.multiRes.cubeResolution / 90 * 0.9)); } if (minHfov > config.maxHfov) {