Skip to content

Commit e202d24

Browse files
authored
IRSA-4183: Merge PR #1122 from IRSA-4183-grid-plane
IRSA-4183: fixed grid not using additional params
2 parents 8d3353f + 642a892 commit e202d24

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

src/firefly/js/metaConvert/MultiProductFileAnalyzer.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,14 @@ export function makeAnalysisGetGridDataProduct(makeReq) {
127127
const promiseAry= reqAry.map( (r) => {
128128
return doUploadAndAnalysis({table,request:r,activateParams})
129129
.then( (result) => {
130-
if (!get(result,'fileMenu.fileAnalysis')) return false;
131-
return gridEntryHasImages(result.fileMenu.fileAnalysis) && r;
130+
if (!result?.fileMenu?.fileAnalysis?.parts) return false;
131+
const {parts}= result.fileMenu.fileAnalysis;
132+
if (!gridEntryHasImages(parts)) return false;
133+
const newReq= r.makeCopy();
134+
parts
135+
.forEach( (p) => Object.entries(p.additionalImageParams ?? {} )
136+
.forEach(([k,v]) => newReq.setParam(k,v)));
137+
return newReq;
132138
});
133139
});
134140

@@ -323,7 +329,7 @@ function watchForUploadUpdate(action, cancelSelf, {url,dpId}) {
323329
}
324330

325331

326-
const gridEntryHasImages= (fileAnalysis) => fileAnalysis.parts.find( (p) => p.type===FileAnalysisType.Image);
332+
const gridEntryHasImages= (parts) => parts.find( (p) => p.type===FileAnalysisType.Image);
327333

328334
function makeErrorResult(message, fileName,url) {
329335
return dpdtMessageWithDownload(`No displayable data available for this row${message?': '+message:''}`, fileName&&'Download: '+fileName, url);

src/firefly/js/ui/CloseButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const middleStyle= {
1818
fontSize: '12pt',
1919
background: `url(${BUTTON_MIDDLE}) top left repeat-x`,
2020
color: 'white',
21-
verticalAlign:'baseline'
21+
verticalAlign:'bottom'
2222
};
2323

2424
/**

src/firefly/js/visualize/ZoomUtil.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {convertAngle} from './VisUtil.js';
1212

1313
export const FullType = new Enum(['ONLY_WIDTH', 'WIDTH_HEIGHT', 'ONLY_HEIGHT']);
1414

15-
export const imageLevels= [.03125, .0625, .125,.1,.25,.3, .4, .5, .75, .8, .9, 1, 1.25, 1.5,2, 2.5,3, 3.5,
15+
export const imageLevels= [.0125, .025, .05,.1,.25,.3, .4, .5, .75, .8, .9, 1, 1.25, 1.5,2, 2.5,3, 3.5,
1616
4,5, 6, 7,8, 9, 10, 11, 12, 13, 14, 15, 16, 18,20,22,24,28, 32];
1717
export const imageLevelsReversed= [...imageLevels].reverse();
1818

src/firefly/js/visualize/iv/ImageTileDrawer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function initImageDrawer(targetCanvas) {
2424

2525

2626
return (plot, opacity,plotView, tileProcessInfo= {shouldProcess:false}) => {
27-
if (!isImage(plot)) return;
27+
if (!isImage(plot) || !plot.affTrans) return;
2828
abortLastDraw?.();
2929
const rootPlot= primePlot(plotView); // bounding box should us main plot not overlay plot
3030
const boundingBox= computeBounding(rootPlot,plotView.viewDim.width,plotView.viewDim.height);

src/firefly/js/visualize/ui/ImageMetaDataToolbarView.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,15 @@ export function ImageMetaDataToolbarView({activePlotId, viewerId, viewerPlotIds=
105105
style={{marginLeft: 5}}
106106
onClick={() => showThreeColorOps(viewer,dataId)}/>
107107
}
108-
{layoutType===SINGLE && viewerPlotIds.length>1 &&
109-
<img style={leftImageStyle} src={PAGE_LEFT}
110-
onClick={() => dispatchChangeActivePlotView(viewerPlotIds[prevIdx])} />
111-
}
112-
{layoutType===SINGLE && viewerPlotIds.length>1 &&
113-
<img style={{cursor:'pointer', paddingLeft:5, flex: '0 0 auto'}}
114-
src={PAGE_RIGHT}
115-
onClick={() => dispatchChangeActivePlotView(viewerPlotIds[nextIdx])} />
116-
}
108+
{/*{layoutType===SINGLE && viewerPlotIds.length>1 &&*/}
109+
{/* <img style={leftImageStyle} src={PAGE_LEFT}*/}
110+
{/* onClick={() => dispatchChangeActivePlotView(viewerPlotIds[prevIdx])} />*/}
111+
{/*}*/}
112+
{/*{layoutType===SINGLE && viewerPlotIds.length>1 &&*/}
113+
{/* <img style={{cursor:'pointer', paddingLeft:5, flex: '0 0 auto'}}*/}
114+
{/* src={PAGE_RIGHT}*/}
115+
{/* onClick={() => dispatchChangeActivePlotView(viewerPlotIds[nextIdx])} />*/}
116+
{/*}*/}
117117
</div>
118118
{showPager && <ImagePager pageSize={converter.maxPlots} tbl_id={activeTable.tbl_id} />}
119119
{(handleInlineTools || viewerPlotIds?.length>1) && <InlineRightToolbarWrapper visRoot={vr} pv={pv} dlAry={pvDlAry} />}

0 commit comments

Comments
 (0)