mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
show date/time for georeferenced photos (#9990)
This commit is contained in:
@@ -85,6 +85,10 @@
|
||||
padding: 4px 2px;
|
||||
z-index: 10;
|
||||
}
|
||||
.photo-attribution-dual {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.photo-attribution a,
|
||||
.photo-attribution a:visited,
|
||||
|
||||
@@ -64,7 +64,7 @@ export function svgLocalPhotos(projection, context, dispatch) {
|
||||
|
||||
viewerEnter
|
||||
.append('div')
|
||||
.attr('class', 'photo-attribution fillD');
|
||||
.attr('class', 'photo-attribution photo-attribution-dual fillD');
|
||||
|
||||
return planePhotoFrame.init(context, viewerEnter)
|
||||
.then(planePhotoFrame => {
|
||||
@@ -84,6 +84,11 @@ export function svgLocalPhotos(projection, context, dispatch) {
|
||||
|
||||
const attribution = viewerWrap.selectAll('.photo-attribution').text('');
|
||||
|
||||
if (image.date) {
|
||||
attribution
|
||||
.append('span')
|
||||
.text(image.date.toLocaleString());
|
||||
}
|
||||
if (image.name) {
|
||||
attribution
|
||||
.append('span')
|
||||
@@ -233,7 +238,8 @@ export function svgLocalPhotos(projection, context, dispatch) {
|
||||
getSrc: () => readFileAsDataURL(file),
|
||||
file: file,
|
||||
loc: [exifData.longitude, exifData.latitude],
|
||||
direction: exifData.GPSImgDirection
|
||||
direction: exifData.GPSImgDirection,
|
||||
date: exifData.CreateDate || exifData.DateTimeOriginal || exifData.ModifyDate,
|
||||
};
|
||||
loaded.push(photo);
|
||||
const sameName = _photos.filter(i => i.name === photo.name);
|
||||
|
||||
Reference in New Issue
Block a user