mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
Map centerEase to selected marker
This commit is contained in:
@@ -115,12 +115,13 @@ iD.MapillaryImageLayer = function(context) {
|
||||
.append('svg')
|
||||
.style('display', enabled ? 'block' : 'none')
|
||||
.on('click', function() { // deselect/select
|
||||
var imageKey = d3.event.target.__data__.key;
|
||||
if (imageKey === mapillary.selectedThumbnail()) {
|
||||
var image = d3.event.target.__data__;
|
||||
if (image.key === mapillary.selectedThumbnail()) {
|
||||
hideThumbnail();
|
||||
} else {
|
||||
mapillary.selectedThumbnail(imageKey);
|
||||
showThumbnail(imageKey);
|
||||
mapillary.selectedThumbnail(image.key);
|
||||
context.map().centerEase(image.loc);
|
||||
showThumbnail(image.key);
|
||||
}
|
||||
})
|
||||
.on('mouseover', function() {
|
||||
|
||||
@@ -80,6 +80,7 @@ iD.MapillarySignLayer = function(context) {
|
||||
hideThumbnail();
|
||||
} else {
|
||||
mapillary.selectedThumbnail(d.key);
|
||||
context.map().centerEase(d.loc);
|
||||
showThumbnail(d.key);
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user