Skip to content

DM-7001: Gator related bugs and region bug #127

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
Jul 30, 2016
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
12 changes: 10 additions & 2 deletions src/firefly/js/api/ApiExpandedView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,20 @@ export class ApiExpandedView extends Component {
const view = expanded === LO_VIEW.tables ? tables
: expanded === LO_VIEW.xyPlots ? xyPlots
: images;
return expanded !== LO_VIEW.none &&
(
if (expanded === LO_VIEW.none) {
document.body.style.overflow= this.saveOverflow;
return false;
}
else {
this.saveOverflow= document.body.style.overflow;
document.body.style.overflow= 'hidden';
return (
<div className='api-expanded rootStyle'>
{view}
</div>
);

}
}
}

1 change: 1 addition & 0 deletions src/firefly/js/api/ApiHighlevelBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ function initCoverage(llApi, targetDiv,options= {}) {
const {dispatchAddSaga}= llApi.action;
const {renderDOM,debug}= llApi.util;
const {watchImageMetaData,watchCoverage}= llApi.util.image;
highlevelImageInit(llApi);


renderDOM(targetDiv, MultiImageViewer,
Expand Down
6 changes: 4 additions & 2 deletions src/firefly/js/ui/PopupPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ export var PopupPanel= React.createClass(
var e= ReactDOM.findDOMNode(this);

var activeLayoutType = this.props.layoutPosition;
var r= getPopupPosition(e,activeLayoutType);
this.setState({activeLayoutType, posX:r.left, posY:r.top });
setTimeout( () => {
var r= getPopupPosition(e,activeLayoutType);
this.setState({activeLayoutType, posX:r.left, posY:r.top });
},10);

},

Expand Down
4 changes: 2 additions & 2 deletions src/firefly/js/visualize/iv/ExpandedTools.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ export function ExpandedTools({visRoot,closeFunc}) {
}
return (
<div>
<div style={{display: 'flex', paddingBottom: 2, borderBottom: '1px solid rgba(0,0,0,.2)' }}>
<div style={{display: 'flex', flexWrap:'wrap',paddingBottom: 2, borderBottom: '1px solid rgba(0,0,0,.2)' }}>
{closeFunc && <CloseButton style={closeButtonStyle} onClick={closeFunc}/>}
<div style={{'flex': '1 1 auto'}}>
<VisToolbar/>
<VisToolbar messageUnder={Boolean(closeFunc)}/>
</div>
</div>
<div style={{width:'100%', height:70, marginTop: 7}} className='disable-select'>
Expand Down
4 changes: 2 additions & 2 deletions src/firefly/js/visualize/reducer/HandlePlotCreation.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function addPlot(state,action, replace, setActive) {
if (!info) return pv;
const {plotAry, overlayPlotViews}= info;
if (setActive) activePlotId= pv.plotId;
return PlotView.replacePlots(pv,plotAry,overlayPlotViews,replace);
return PlotView.replacePlots(pv,plotAry,overlayPlotViews, state.expandedMode, replace);
});
}
else {// used for single plot update
Expand All @@ -111,7 +111,7 @@ function addPlot(state,action, replace, setActive) {
plotViewAry= plotViewAry.map( (pv) => { // map has side effect of setting active plotId
if (pv.plotId!==plotId ) return pv;
if (setActive) activePlotId= plotId;
return PlotView.replacePlots(pv,plotAry,overlayPlotViews, replace);
return PlotView.replacePlots(pv,plotAry,overlayPlotViews, state.expandedMode, replace);
});
}
return clone(state, {plotViewAry,activePlotId});
Expand Down
7 changes: 4 additions & 3 deletions src/firefly/js/visualize/reducer/PlotView.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {DEFAULT_THUMBNAIL_SIZE} from '../WebPlotRequest.js';
import SimpleMemCache from '../../util/SimpleMemCache.js';
import {CCUtil, CysConverter} from './../CsysConverter.js';
import {defMenuItemKeys} from '../MenuItemKeys.js';
import {ExpandType} from '../ImagePlotCntlr.js';

// export const DATASET_INFO_CONVERTER = 'DATASET_INFO_CONVERTER';

Expand Down Expand Up @@ -185,12 +186,12 @@ export function changePrimePlot(pv, nextIdx) {
*
* @param pv
* @param plotAry
* @param expanded
* @param overlayPlotViews
* @param expandedMode
* @param keepPrimeIdx
* @return {Object|*}
*/
function replacePlots(pv, plotAry, overlayPlotViews=null,keepPrimeIdx=false) {
function replacePlots(pv, plotAry, overlayPlotViews, expandedMode, keepPrimeIdx=false) {

pv= Object.assign({},pv);
pv.plotViewCtx= Object.assign({},pv.plotViewCtx);
Expand Down Expand Up @@ -228,7 +229,7 @@ function replacePlots(pv, plotAry, overlayPlotViews=null,keepPrimeIdx=false) {
pv.plotViewCtx.containsMultiImageFits= pv.plots.every( (p) => p.plotState.isMultiImageFile());
pv.plotViewCtx.containsMultipleCubes= pv.plots.every( (p) => p.plotState.getCubeCnt()>1);
pv.plotViewCtx.rotateNorthLock= pv.plots[pv.primeIdx].plotState.getRotateType()===RotateType.NORTH; // todo, study this more, understand why
pv.plotViewCtx.lastCollapsedZoomLevel= pv.plots[pv.primeIdx].zoomFactor;
if (expandedMode===ExpandType.COLLAPSE) pv.plotViewCtx.lastCollapsedZoomLevel= pv.plots[pv.primeIdx].zoomFactor;

pv= initScrollCenterPoint(pv);

Expand Down
14 changes: 12 additions & 2 deletions src/firefly/js/visualize/saga/CoverageWatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function updateCoverageWithData(table, options, tbl_id, allRowsTable, decimatedT

function computeSize(options, decimatedTables,allRowsTable) {
const ary= options.multiCoverage ? values(decimatedTables) : [allRowsTable];
const testAry= ary
var testAry= ary
.filter( (t) => t && t!=='WORKING')
.map( (t) => {
var ptAry= [];
Expand All @@ -264,9 +264,19 @@ function computeSize(options, decimatedTables,allRowsTable) {
}
return flattenDeep(ptAry);
} );
return computeCentralPointAndRadius(flattenDeep(testAry));
testAry= flattenDeep(testAry);
if (isOnePoint(testAry)) {
return {centralPoint:testAry[0], maxRadius: .05};
}
else {
return computeCentralPointAndRadius(testAry);
}
}

function isOnePoint(wpList) {
if (isEmpty(wpList)) return false;
return !wpList.some( (wp) => !pointEquals(wp,wpList[0]));
}



Expand Down