From 9ecdd0e1eda1119990b6a29356188d38997f37f5 Mon Sep 17 00:00:00 2001 From: roby Date: Tue, 5 Nov 2024 16:03:05 -0700 Subject: [PATCH] Firefly-1604: fixed crash --- src/firefly/js/drawingLayers/hpx/TileDataMaker.jsx | 2 +- src/firefly/js/visualize/ui/VisualSearchUtils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/firefly/js/drawingLayers/hpx/TileDataMaker.jsx b/src/firefly/js/drawingLayers/hpx/TileDataMaker.jsx index 4cc652be3..581302fff 100644 --- a/src/firefly/js/drawingLayers/hpx/TileDataMaker.jsx +++ b/src/firefly/js/drawingLayers/hpx/TileDataMaker.jsx @@ -69,7 +69,7 @@ export function createTileDataMaker() { const {centerWp, fov} = getPointMaxSide(plot, plot.viewDim); const coverageTblIds = hasCoverageTables(centerWp, fov, isHiPSAitoff(plot)); - if (!coverageTblIds.includes(tbl_id)) return []; // this should force a clear for this layer + if (!centerWp || !coverageTblIds.includes(tbl_id)) return []; // this should force a clear for this layer const cells = getAllVisibleHiPSCells(norder, centerWp, fov*1.3, CoordSys.EQ_J2000, isHiPSAitoff(plot)); const tblIdx = coverageTblIds.indexOf(tbl_id); const cc = CysConverter.make(plot); diff --git a/src/firefly/js/visualize/ui/VisualSearchUtils.js b/src/firefly/js/visualize/ui/VisualSearchUtils.js index 6799d99d8..3e0b8ab5d 100644 --- a/src/firefly/js/visualize/ui/VisualSearchUtils.js +++ b/src/firefly/js/visualize/ui/VisualSearchUtils.js @@ -323,7 +323,7 @@ export function updatePlotOverlayFromUserInput(plotId, whichOverlay, wp, radius, const dl = getDrawLayerByType(getDlAry(), SearchSelectTool.TYPE_ID); if (!dl) return; const isCone = whichOverlay === CONE_CHOICE_KEY; - const plot= primePlot(visRoot()); + const plot= primePlot(visRoot(),plotId); dispatchChangeDrawingDef(dl.drawLayerId,{...dl.drawingDef,color:'yellow'},plotId); dispatchModifyCustomField(dl.drawLayerId,{isInteractive: true},plotId);