diff --git a/modules/services/mapillary.js b/modules/services/mapillary.js index 30747f4b8..8540cf2a0 100644 --- a/modules/services/mapillary.js +++ b/modules/services/mapillary.js @@ -589,9 +589,9 @@ export default { }); // imageChanged: called after the viewer has changed images and is ready. - function imageChanged(node) { + function imageChanged(photo) { this.resetTags(); - const image = node.image; + const image = photo.image; this.setActiveImage(image); this.setStyles(context, null); const loc = [image.originalLngLat.lng, image.originalLngLat.lat]; diff --git a/test/spec/services/mapillary.js b/test/spec/services/mapillary.js index fc32e0c3c..6892b347e 100644 --- a/test/spec/services/mapillary.js +++ b/test/spec/services/mapillary.js @@ -194,9 +194,9 @@ describe('iD.serviceMapillary', function() { describe('#setActiveImage', function() { it('gets and sets the selected image', function() { - var node = { id: 'baz', originalLngLat: {lng: 10, lat: 0}}; - mapillary.setActiveImage(node); - expect(mapillary.getActiveImage().id).to.eql(node.id); + const photo = { id: 'baz', originalLngLat: {lng: 10, lat: 0}}; + mapillary.setActiveImage(photo); + expect(mapillary.getActiveImage().id).to.eql(photo.id); }); }); diff --git a/test/spec/services/panoramax.js b/test/spec/services/panoramax.js index 37ca7058c..e044b0485 100644 --- a/test/spec/services/panoramax.js +++ b/test/spec/services/panoramax.js @@ -190,10 +190,10 @@ describe('iD.servicePanoramax', function() { describe('#selectedImage', function() { it('sets and gets selected image', function() { - var d = { id: 'foo', sequence_id: '100'}; - panoramax.cache().images = { forImageId: { foo: d }}; + const photo = { id: 'foo', sequence_id: '100'}; + panoramax.cache().images = { forImageId: { foo: photo }}; panoramax.selectImage(context, 'foo'); - expect(panoramax.getActiveImage().id).to.eql(d.id); + expect(panoramax.getActiveImage().id).to.eql(photo.id); }); }); });