mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
change variables for better readability, closes #11022
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user