Skip to content

Commit

Permalink
Merge pull request #1 from tyrasd/panoramax
Browse files Browse the repository at this point in the history
fix zoom/pan glitch on plane photos
  • Loading branch information
mattiapezzotti authored Jun 28, 2024
2 parents 6b0d6f7 + 21d9971 commit 821c74b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions css/60_photos.css
Original file line number Diff line number Diff line change
Expand Up @@ -475,11 +475,10 @@ label.streetside-hires {
transform-origin: 0 0;
}

.photoviewer .plane-frame > img.plane-photo{
width: 100%;
.photoviewer .plane-frame > img.plane-photo {
width: auto;
height: 100%;
object-fit: cover;
overflow: hidden;
transform-origin: 0 0;
}

/* photo-controls (step forward, back, rotate) */
Expand Down
9 changes: 4 additions & 5 deletions modules/services/plane_photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,13 @@ export default {

selectPhoto: function (data, keepOrientation) {
dispatch.call('viewerChanged');

loadImage(_photo, '');
loadImage(_photo, data.image_path)
.then(() => {
if (!keepOrientation) {
imgZoom = zoomBeahvior();
_wrapper.call(imgZoom);
_wrapper.call(imgZoom.transform, d3_zoomIdentity.translate(-_widthOverflow / 2, 0));
}
imgZoom = zoomBeahvior();
_wrapper.call(imgZoom);
_wrapper.call(imgZoom.transform, d3_zoomIdentity.translate(-_widthOverflow / 2, 0));
});
return this;
},
Expand Down

0 comments on commit 821c74b

Please sign in to comment.