From b8ff5c7f330c9cfb25585fe65c6878110abf4c98 Mon Sep 17 00:00:00 2001 From: Michael Rogers Date: Tue, 17 May 2022 20:44:16 -0500 Subject: [PATCH] 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 --- .../imagery/exampleImagery.e2e.spec.js | 20 +++++++++++++++++++ .../imagery/components/ImageryView.vue | 7 ------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js b/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js index 5f79da590e..8fcafb0681 100644 --- a/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js +++ b/e2e/tests/plugins/imagery/exampleImagery.e2e.spec.js @@ -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'); diff --git a/src/plugins/imagery/components/ImageryView.vue b/src/plugins/imagery/components/ImageryView.vue index a0ef2b8e4e..2d0cce2e60 100644 --- a/src/plugins/imagery/components/ImageryView.vue +++ b/src/plugins/imagery/components/ImageryView.vue @@ -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); },