Skip to content

DM-11398: fixes some time series display issues #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/firefly/js/templates/lightcurve/LcImageToolbarView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import PropTypes from 'prop-types';
import {get} from 'lodash';
import BrowserInfo from '../../util/BrowserInfo.js';
import {getPlotViewById, getAllDrawLayersForPlot} from '../../visualize/PlotViewUtil.js';
import {WcsMatchType, visRoot, dispatchWcsMatch} from '../../visualize/ImagePlotCntlr.js';
import {WcsMatchType, visRoot, dispatchWcsMatch, dispatchRecenter} from '../../visualize/ImagePlotCntlr.js';
import {VisInlineToolbarView} from '../../visualize/ui/VisInlineToolbarView.jsx';
import {RadioGroupInputFieldView} from '../../ui/RadioGroupInputFieldView.jsx';
import {dispatchChangeViewerLayout, getViewer, getMultiViewRoot, GRID, SINGLE} from '../../visualize/MultiViewCntlr.js';
Expand Down Expand Up @@ -116,10 +116,13 @@ export function LcImageToolbarView({activePlotId, viewerId, viewerPlotIds, layou


function changeSize(viewerId, value) {
value= Number(value);
dispatchChangeViewerLayout(viewerId, value === 1 ? SINGLE : GRID, {count:value});
value = Number(value);
dispatchChangeViewerLayout(viewerId, value === 1 ? SINGLE : GRID, {count: value});
const vr = visRoot();
return setTimeout(() => dispatchRecenter({plotId: vr.activePlotId}), 1000);
}


// <ImagePager pageSize={10} tbl_id={tableId} />
// <ToolbarButton icon={ONE} tip={'Show single image at full size'}
// imageStyle={{width:24,height:24, flex: '0 0 auto'}}
Expand Down
7 changes: 7 additions & 0 deletions src/firefly/js/templates/lightcurve/LcManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,14 @@ export function setupImages(layoutInfo) {
const viewer = getViewer(getMultiViewRoot(), LC.IMG_VIEWER_ID);
const count = get(viewer, 'layoutDetail.count', converterData.defaultImageCount);


var vr = visRoot();

if (plotIdRoot+tableModel.highlightedRow===vr.activePlotId && count===get(viewer,'itemIdAry', []).length) {
return;
}


const hasPlots = vr.plotViewAry.length > 0;
const newPlotIdAry = makePlotIds(tableModel.highlightedRow, tableModel.totalRows, count);
const maxPlotIdAry = makePlotIds(tableModel.highlightedRow, tableModel.totalRows, LC.MAX_IMAGE_CNT);
Expand Down
4 changes: 2 additions & 2 deletions src/firefly/js/visualize/ImagePlotCntlr.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ export function dispatchProcessScroll({plotId,scrollPt, disableBoundCheck=false,
* Note - function parameter is a single object
* @param {Object} p
* @param {string} p.plotId
* @param {Point} p.centerPt Point to center on
* @param {Point} [p.centerPt] Point to center on
* @param {boolean} p.centerOnImage only used if centerPt is not defined. If true then the centering will be
* the center of the image. If false, then the center point will be the
* FIXED_TARGET attribute, if defined. Otherwise it will be the center of the image.
Expand All @@ -522,7 +522,7 @@ export function dispatchProcessScroll({plotId,scrollPt, disableBoundCheck=false,
* @function dispatchRecenter
* @memberof firefly.action
*/
export function dispatchRecenter({plotId, centerPt, centerOnImage, dispatcher= flux.process}) {
export function dispatchRecenter({plotId, centerPt= undefined, centerOnImage=false, dispatcher= flux.process}) {
dispatcher({type: RECENTER, payload: {plotId, centerPt, centerOnImage} });
}

Expand Down