mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix zoom for plane photos. TODO: set translateExtent correctly.
This commit is contained in:
@@ -355,7 +355,7 @@ label.streetside-hires {
|
||||
}
|
||||
|
||||
.kartaview-image-wrap,
|
||||
.vegbilder-image-wrap {
|
||||
.plane-photo {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform-origin:0 0;
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user