From 0002705c4c5d5cd1c9e0fd43f828f0712bc73701 Mon Sep 17 00:00:00 2001 From: "Chen, I-Chenn" <106953609+I-Chenn@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:44:19 +0800 Subject: [PATCH 1/2] Icchen/2091 contour levels not deleted as intended (#2105) * Sort levels after adding new one * Syntax tweak * Apply fix to text input field and update changelog * Prettier formatting --- CHANGELOG.md | 1 + src/components/Dialogs/ContourDialog/ContourDialogComponent.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5c1ff74cf..26eeaf4fca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Added a toggle button to let users decide whether or not to keep the previously generated moment images ([#2054](https://github.com/CARTAvis/carta-frontend/issues/2054)). * Added settings in the image view settings widget for panning and zooming the images ([#1176](https://github.com/CARTAvis/carta-frontend/issues/1176)). ### Fixed +* Fixed the issue of contour levels not deleted as intended ([#2091](https://github.com/CARTAvis/carta-frontend/issues/2091)). * Fixed issue of only enabling catalog selection button when there is a layer of catalog overlay ([#1826](https://github.com/CARTAvis/carta-frontend/issues/1826)). * Fixed the issue of the corrupted spatial profile when cursor is moving ([#1602](https://github.com/CARTAvis/carta-frontend/issues/1602)). * Fixed NaN pixel value in the cursor info bar of the image viewer when the image is 1x1 pixel ([#1879](https://github.com/CARTAvis/carta-frontend/issues/1879)). diff --git a/src/components/Dialogs/ContourDialog/ContourDialogComponent.tsx b/src/components/Dialogs/ContourDialog/ContourDialogComponent.tsx index 06b5e213e5..a2d5dc4c6b 100644 --- a/src/components/Dialogs/ContourDialog/ContourDialogComponent.tsx +++ b/src/components/Dialogs/ContourDialog/ContourDialogComponent.tsx @@ -223,6 +223,7 @@ export class ContourDialogComponent extends React.Component { private handleGraphClicked = (x: number) => { this.levels.push(x); + this.levels.sort(); }; private handleGraphRightClicked = (x: number) => { @@ -250,6 +251,7 @@ export class ContourDialogComponent extends React.Component { const val = parseFloat(valueString); if (isFinite(val)) { this.levels.push(val); + this.levels.sort(); } } } catch (e) { From cf3fb0153d2194a0405102a92845405faf2164ce Mon Sep 17 00:00:00 2001 From: Carli <94193689+crocka@users.noreply.github.com> Date: Fri, 24 Feb 2023 03:49:41 -0500 Subject: [PATCH 2/2] carli/1790_jumpy_pv_image (#2096) * Avoided PV image to run syncStage * Ran reformat * Fixed syncStage * Corrected misspelled folder and file names * Minor change * Updated Changelog --- CHANGELOG.md | 1 + .../ImageView/RegionView/RegionViewComponent.tsx | 7 +++---- .../CatalogOnlineQueryConfigStore.ts} | 0 .../CatalogOnlineQueryProfileStore.ts | 0 src/stores/index.ts | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename src/stores/{CatalogOnlieQuery/CatalogOnlieQueryConfigStore.ts => CatalogOnlineQuery/CatalogOnlineQueryConfigStore.ts} (100%) rename src/stores/{CatalogOnlieQuery => CatalogOnlineQuery}/CatalogOnlineQueryProfileStore.ts (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26eeaf4fca..441e999e94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Fixed the region position offset mismatch problem after zooming to fit for spatially matched images. ([#2028](https://github.com/CARTAvis/carta-frontend/issues/2028)). * Improved the performance of loading regions in batches ([#2040](https://github.com/CARTAvis/carta-frontend/issues/2040)). * Fixed offset between cusorInfo and upper wcs axis in the spatial profilers ([#1319](https://github.com/CARTAvis/carta-frontend/issues/1319)). +* Fixed mismatch between cursor and image during PV image panning ([#1790](https://github.com/CARTAvis/carta-frontend/issues/1790)). * Fixed the hanging problem for computed stokes animation ([#1238](https://github.com/CARTAvis/carta-backend/issues/1238)). ### Changed * Increased the upper limit of averaging width for line/polyline spatial profiles or PV images calculations ([#1949](https://github.com/CARTAvis/carta-frontend/issues/1949)). diff --git a/src/components/ImageView/RegionView/RegionViewComponent.tsx b/src/components/ImageView/RegionView/RegionViewComponent.tsx index 5ba8fd3ee3..95a7ae0b00 100644 --- a/src/components/ImageView/RegionView/RegionViewComponent.tsx +++ b/src/components/ImageView/RegionView/RegionViewComponent.tsx @@ -463,8 +463,8 @@ export class RegionViewComponent extends React.Component 0 ? zoomSpeed : 1.0 / zoomSpeed); - frame.zoomToPoint(cursorInfo.posImageSpace.x, cursorInfo.posImageSpace.y, newZoom, true); + frame.zoomToPoint(cursorPosImageSpace.x, cursorPosImageSpace.y, newZoom, true); // Zoom stage const zoomCenter = PreferenceStore.Instance.zoomPoint === ZoomPoint.CURSOR ? {x: mouseEvent.offsetX, y: mouseEvent.offsetY} : {x: this.props.width / 2, y: this.props.height / 2}; diff --git a/src/stores/CatalogOnlieQuery/CatalogOnlieQueryConfigStore.ts b/src/stores/CatalogOnlineQuery/CatalogOnlineQueryConfigStore.ts similarity index 100% rename from src/stores/CatalogOnlieQuery/CatalogOnlieQueryConfigStore.ts rename to src/stores/CatalogOnlineQuery/CatalogOnlineQueryConfigStore.ts diff --git a/src/stores/CatalogOnlieQuery/CatalogOnlineQueryProfileStore.ts b/src/stores/CatalogOnlineQuery/CatalogOnlineQueryProfileStore.ts similarity index 100% rename from src/stores/CatalogOnlieQuery/CatalogOnlineQueryProfileStore.ts rename to src/stores/CatalogOnlineQuery/CatalogOnlineQueryProfileStore.ts diff --git a/src/stores/index.ts b/src/stores/index.ts index 878a1e8ef6..b9497807d3 100644 --- a/src/stores/index.ts +++ b/src/stores/index.ts @@ -3,8 +3,8 @@ export * from "./AnimatorStore/AnimatorStore"; export * from "./AppStore/AppStore"; export * from "./Catalog/CatalogProfileStore"; export * from "./Catalog/CatalogStore"; -export * from "./CatalogOnlieQuery/CatalogOnlieQueryConfigStore"; -export * from "./CatalogOnlieQuery/CatalogOnlineQueryProfileStore"; +export * from "./CatalogOnlineQuery/CatalogOnlineQueryConfigStore"; +export * from "./CatalogOnlineQuery/CatalogOnlineQueryProfileStore"; export * from "./DialogStore/DialogStore"; export * from "./FileBrowserStore/FileBrowserStore"; export * from "./HelpStore/HelpStore";