Pan/Zoom persistence and pause handling improvements - 5068 (#5188)

* Remove pause on pan/zoom wheel or button input

* Test to ensure that pause mode is not activated during zoom

Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
This commit is contained in:
Michael Rogers 2022-05-17 20:44:16 -05:00 committed by GitHub
parent 9ede023cfa
commit b8ff5c7f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 7 deletions

View File

@ -205,6 +205,26 @@ test.describe('Example Imagery', () => {
expect(resetBoundingBox.width).toEqual(initialBoundingBox.width);
});
test('Using the zoom features does not pause telemetry', async ({ page }) => {
const bgImageLocator = page.locator(backgroundImageSelector);
const pausePlayButton = page.locator('.c-button.pause-play');
// wait for zoom animation to finish
await bgImageLocator.hover();
// open the time conductor drop down
await page.locator('.c-conductor__controls button.c-mode-button').click();
// Click local clock
await page.locator('.icon-clock >> text=Local Clock').click();
await expect.soft(pausePlayButton).not.toHaveClass(/is-paused/);
const zoomInBtn = page.locator('.t-btn-zoom-in');
await zoomInBtn.click();
// wait for zoom animation to finish
await bgImageLocator.hover();
return expect(pausePlayButton).not.toHaveClass(/is-paused/);
});
//test.fixme('Can use Mouse Wheel to zoom in and out of previous image');
//test.fixme('Can zoom into the latest image and the real-time/fixed-time imagery will pause');
//test.fixme('Can zoom into a previous image from thumbstrip in real-time or fixed-time');

View File

@ -887,10 +887,6 @@ export default {
this.imageTranslateY = 0;
},
handlePanZoomUpdate({ newScaleFactor, screenClientX, screenClientY }) {
if (!this.isPaused) {
this.paused(true);
}
if (!(screenClientX || screenClientY)) {
return this.updatePanZoom(newScaleFactor, 0, 0);
}
@ -1040,9 +1036,6 @@ export default {
},
wheelZoom(e) {
e.preventDefault();
if (!this.isPaused) {
this.paused(true);
}
this.$refs.imageControls.wheelZoom(e);
},