Skip to content

Commit

Permalink
hfov, pitch and direction is now held between sequences and images as…
Browse files Browse the repository at this point in the history
… asked in openstreetmap#10392
  • Loading branch information
mattiapezzotti committed Aug 9, 2024
1 parent 2f5920c commit 4e7a0f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion modules/services/pannellum_photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,14 @@ export default {

let yaw = 0;
let pitch = 0;
let hfov = 0;

if (keepOrientation) {
yaw = this.getYaw();
pitch = _pannellumViewer.getPitch();
hfov = _pannellumViewer.getHfov();
}
_pannellumViewer.loadScene(key, pitch, yaw);
_pannellumViewer.loadScene(key, pitch, yaw, hfov);
dispatch.call('viewerChanged');

if (_currScenes.length > 3) {
Expand Down
4 changes: 0 additions & 4 deletions modules/svg/panoramax_images.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,6 @@ export function svgPanoramaxImages(projection, context, dispatch) {
const service = getService();
if (!service) return;

if (image.sequence_id !== _selectedSequence) {
_viewerYaw = 0; // reset
}

service
.ensureViewerLoaded(context)
.then(function() {
Expand Down

0 comments on commit 4e7a0f7

Please sign in to comment.