diff --git a/css/60_photos.css b/css/60_photos.css index 96ce413a2..b359bc30b 100644 --- a/css/60_photos.css +++ b/css/60_photos.css @@ -355,7 +355,7 @@ label.streetside-hires { } .kartaview-image-wrap, -.vegbilder-image-wrap { +.plane-photo { width: 100%; height: 100%; transform-origin:0 0; diff --git a/modules/services/plane_photo.js b/modules/services/plane_photo.js index 275a011d9..9449926ec 100644 --- a/modules/services/plane_photo.js +++ b/modules/services/plane_photo.js @@ -1,5 +1,5 @@ import { dispatch as d3_dispatch } from 'd3-dispatch'; -import { zoom as d3_zoom } from 'd3-zoom'; +import { zoom as d3_zoom, zoomIdentity as d3_zoomIdentity } from 'd3-zoom'; import { utilSetTransform, utilRebind } from '../util'; const dispatch = d3_dispatch('viewerChanged'); @@ -57,6 +57,7 @@ export default { return this; }, + hidePhotoFrame: function (context) { context .select('photo-frame.plane-frame') @@ -65,8 +66,11 @@ export default { return this; }, - selectPhoto: function (data) { + selectPhoto: function (data, keepOrientation) { _photo.attr('src', data.image_path); + if (!keepOrientation) { + _photo.call(imgZoom.transform, d3_zoomIdentity); + } return this; },