Skip to content

Commit d412c3d

Browse files
authored
DM-11398: Merge PR #437 from dm-11398-ts
DM-11398: fixes some time series display issues
2 parents 6e9ada3 + 9750c4e commit d412c3d

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/firefly/js/templates/lightcurve/LcImageToolbarView.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
88
import {get} from 'lodash';
99
import BrowserInfo from '../../util/BrowserInfo.js';
1010
import {getPlotViewById, getAllDrawLayersForPlot} from '../../visualize/PlotViewUtil.js';
11-
import {WcsMatchType, visRoot, dispatchWcsMatch} from '../../visualize/ImagePlotCntlr.js';
11+
import {WcsMatchType, visRoot, dispatchWcsMatch, dispatchRecenter} from '../../visualize/ImagePlotCntlr.js';
1212
import {VisInlineToolbarView} from '../../visualize/ui/VisInlineToolbarView.jsx';
1313
import {RadioGroupInputFieldView} from '../../ui/RadioGroupInputFieldView.jsx';
1414
import {dispatchChangeViewerLayout, getViewer, getMultiViewRoot, GRID, SINGLE} from '../../visualize/MultiViewCntlr.js';
@@ -116,10 +116,13 @@ export function LcImageToolbarView({activePlotId, viewerId, viewerPlotIds, layou
116116

117117

118118
function changeSize(viewerId, value) {
119-
value= Number(value);
120-
dispatchChangeViewerLayout(viewerId, value === 1 ? SINGLE : GRID, {count:value});
119+
value = Number(value);
120+
dispatchChangeViewerLayout(viewerId, value === 1 ? SINGLE : GRID, {count: value});
121+
const vr = visRoot();
122+
return setTimeout(() => dispatchRecenter({plotId: vr.activePlotId}), 1000);
121123
}
122124

125+
123126
// <ImagePager pageSize={10} tbl_id={tableId} />
124127
// <ToolbarButton icon={ONE} tip={'Show single image at full size'}
125128
// imageStyle={{width:24,height:24, flex: '0 0 auto'}}

src/firefly/js/templates/lightcurve/LcManager.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,14 @@ export function setupImages(layoutInfo) {
667667
const viewer = getViewer(getMultiViewRoot(), LC.IMG_VIEWER_ID);
668668
const count = get(viewer, 'layoutDetail.count', converterData.defaultImageCount);
669669

670+
670671
var vr = visRoot();
672+
673+
if (plotIdRoot+tableModel.highlightedRow===vr.activePlotId && count===get(viewer,'itemIdAry', []).length) {
674+
return;
675+
}
676+
677+
671678
const hasPlots = vr.plotViewAry.length > 0;
672679
const newPlotIdAry = makePlotIds(tableModel.highlightedRow, tableModel.totalRows, count);
673680
const maxPlotIdAry = makePlotIds(tableModel.highlightedRow, tableModel.totalRows, LC.MAX_IMAGE_CNT);

src/firefly/js/visualize/ImagePlotCntlr.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ export function dispatchProcessScroll({plotId,scrollPt, disableBoundCheck=false,
512512
* Note - function parameter is a single object
513513
* @param {Object} p
514514
* @param {string} p.plotId
515-
* @param {Point} p.centerPt Point to center on
515+
* @param {Point} [p.centerPt] Point to center on
516516
* @param {boolean} p.centerOnImage only used if centerPt is not defined. If true then the centering will be
517517
* the center of the image. If false, then the center point will be the
518518
* FIXED_TARGET attribute, if defined. Otherwise it will be the center of the image.
@@ -522,7 +522,7 @@ export function dispatchProcessScroll({plotId,scrollPt, disableBoundCheck=false,
522522
* @function dispatchRecenter
523523
* @memberof firefly.action
524524
*/
525-
export function dispatchRecenter({plotId, centerPt, centerOnImage, dispatcher= flux.process}) {
525+
export function dispatchRecenter({plotId, centerPt= undefined, centerOnImage=false, dispatcher= flux.process}) {
526526
dispatcher({type: RECENTER, payload: {plotId, centerPt, centerOnImage} });
527527
}
528528

0 commit comments

Comments
 (0)