Skip to content

Commit 734d8fa

Browse files
authored
Merge pull request #227 from Caltech-IPAC/DM-7969-input-time-offset
DM-7969: Offset time input field already introduced.
2 parents c92c288 + 93fb2ba commit 734d8fa

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

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

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ function setPFTableSuccess(hideDropDown = false) {
508508
dispatchTableSearch(tReq, {removable: false});
509509

510510
let xyPlotParams = {
511+
userSetBoundaries: {xMax: 2},
511512
x: {columnOrExpr: 'phase', options: 'grid'},
512513
y: {columnOrExpr: 'w1mpro_ep', options: 'grid'}
513514
};
@@ -604,15 +605,10 @@ function computePeriodRange(tbl_id, timeColName) {
604605
var min, max;
605606

606607
tIdx = columns.findIndex((col) => (col.name === timeColName));
607-
data.forEach((dRow) => {
608-
var dTime = dRow[tIdx];
609608

610-
if (dTime > maxTime) {
611-
maxTime = dTime;
612-
} else if (dTime < minTime) {
613-
minTime = dTime;
614-
}
615-
});
609+
let arr=[]; data.map((e)=> arr.push(e[tIdx]));
610+
minTime = Math.min(...arr);
611+
maxTime = Math.max(...arr);
616612

617613
timeZero = minTime;
618614
timeMax = maxTime;

0 commit comments

Comments
 (0)