change variables for better readability, closes #11022

This commit is contained in:
Martin Raifer
2025-05-06 11:24:46 +02:00
parent 39d2201e6e
commit 5c721808c6
3 changed files with 8 additions and 8 deletions

View File

@@ -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];

View File

@@ -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);
});
});

View File

@@ -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);
});
});
});