As suggested in the issue, I changed the zoomLevel variables in the zoomControl in validate to wrap them with Math.round() so that they were rounded to the appropriate decimal value. I also went into the zoomControl in explore and looked through the commit history to see why we were doing parseInt(zoomLevelIn), and I found that it's been like that since the very first commit where no reasoning was provided. So I went ahead and changed that to a Math.round as well.
Before/After screenshots (if applicable)
Before (couldn't zoom sometimes even if the button wasn't grayed out)
After (can always zoom until the button is grayed out)
Testing instructions
I was able to reproduce this issue, albeit occasionally, whenever I went through validate and kept zooming in and zooming out. The exact way I tested this was by going through 4 different validate missions and for each new frame, zooming in and zooming out, making sure that the three zoom levels showed up & the buttons worked every time they were not grayed out.
I also added console.log() statements to print out the original svv.panorama.getPov().zoom & verified that whenever it printed out a decimal (like 1.99999996), we still were able to get the three zoom levels because of the rounding.
Go to validate
Click through frames doing the process described above
Repeat for 4-5 missions
Things to check before submitting the PR
[x] I've written a descriptive PR title.
[x] I've added/updated comments for large or confusing blocks of code.
Also in testing this PR I found that the default zoom for some panos is different, like some panos we start off at 1, some we start off at 3, etc. Should I fix that in this PR also?
Resolves #3646
As suggested in the issue, I changed the zoomLevel variables in the zoomControl in validate to wrap them with Math.round() so that they were rounded to the appropriate decimal value. I also went into the zoomControl in explore and looked through the commit history to see why we were doing parseInt(zoomLevelIn), and I found that it's been like that since the very first commit where no reasoning was provided. So I went ahead and changed that to a Math.round as well.
Before/After screenshots (if applicable)
Before (couldn't zoom sometimes even if the button wasn't grayed out)
After (can always zoom until the button is grayed out)
Testing instructions
I was able to reproduce this issue, albeit occasionally, whenever I went through validate and kept zooming in and zooming out. The exact way I tested this was by going through 4 different validate missions and for each new frame, zooming in and zooming out, making sure that the three zoom levels showed up & the buttons worked every time they were not grayed out.
I also added console.log() statements to print out the original svv.panorama.getPov().zoom & verified that whenever it printed out a decimal (like 1.99999996), we still were able to get the three zoom levels because of the rounding.
Things to check before submitting the PR