mirror of
https://github.com/nasa/openmct.git
synced 2025-03-12 15:34:36 +00:00
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:
parent
9ede023cfa
commit
b8ff5c7f33
@ -205,6 +205,26 @@ test.describe('Example Imagery', () => {
|
|||||||
expect(resetBoundingBox.width).toEqual(initialBoundingBox.width);
|
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 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 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');
|
//test.fixme('Can zoom into a previous image from thumbstrip in real-time or fixed-time');
|
||||||
|
@ -887,10 +887,6 @@ export default {
|
|||||||
this.imageTranslateY = 0;
|
this.imageTranslateY = 0;
|
||||||
},
|
},
|
||||||
handlePanZoomUpdate({ newScaleFactor, screenClientX, screenClientY }) {
|
handlePanZoomUpdate({ newScaleFactor, screenClientX, screenClientY }) {
|
||||||
if (!this.isPaused) {
|
|
||||||
this.paused(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(screenClientX || screenClientY)) {
|
if (!(screenClientX || screenClientY)) {
|
||||||
return this.updatePanZoom(newScaleFactor, 0, 0);
|
return this.updatePanZoom(newScaleFactor, 0, 0);
|
||||||
}
|
}
|
||||||
@ -1040,9 +1036,6 @@ export default {
|
|||||||
},
|
},
|
||||||
wheelZoom(e) {
|
wheelZoom(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!this.isPaused) {
|
|
||||||
this.paused(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$refs.imageControls.wheelZoom(e);
|
this.$refs.imageControls.wheelZoom(e);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user