mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-22 16:19:48 +02:00
keep photo viewer state on reset, properly clean up active marker
when switching between photos from different providers fixes #10987
This commit is contained in:
@@ -43,13 +43,12 @@ describe('iD.serviceKartaview', function() {
|
||||
});
|
||||
|
||||
describe('#reset', function() {
|
||||
it('resets cache and image', function() {
|
||||
it('resets cache', function() {
|
||||
kartaview.cache().foo = 'bar';
|
||||
kartaview.selectImage(context, {key: 'baz'});
|
||||
|
||||
kartaview.reset();
|
||||
expect(kartaview.cache()).to.not.have.property('foo');
|
||||
expect(kartaview.getSelectedImage()).to.be.null;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -42,13 +42,12 @@ describe('iD.serviceMapillary', function() {
|
||||
|
||||
|
||||
describe('#reset', function() {
|
||||
it('resets cache and image', function() {
|
||||
it('resets cache', function() {
|
||||
mapillary.cache().foo = 'bar';
|
||||
mapillary.selectImage(context, { key: 'baz', loc: [10,0] });
|
||||
|
||||
mapillary.reset();
|
||||
expect(mapillary.cache()).to.not.have.property('foo');
|
||||
expect(mapillary.getActiveImage()).to.be.null;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -79,13 +79,12 @@ describe('iD.servicePanoramax', function() {
|
||||
});
|
||||
|
||||
describe('#reset', function() {
|
||||
it('resets cache and image', function() {
|
||||
it('resets cache', function() {
|
||||
panoramax.cache().foo = 'bar';
|
||||
panoramax.setActiveImage(context, {key: 'baz'});
|
||||
|
||||
panoramax.reset();
|
||||
expect(panoramax.cache()).to.not.have.property('foo');
|
||||
expect(panoramax.getActiveImage()).to.be.null;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user