Skip to content

Commit

Permalink
update formatedEmissions
Browse files Browse the repository at this point in the history
  • Loading branch information
f-idiris committed Sep 12, 2023
1 parent 2cd7aa3 commit c3d0ca0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
8 changes: 1 addition & 7 deletions dist/helpers/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ const formatedEmissions = function (peaks, maxY) {
x: k,
y: ordered[k]
}));
return ordered.map(o => `${o.x}`).join(', ');
return `λex = ${fixedWavelength} nm; λem = ${ordered.map(o => `${o.x}`).join(', ')}`;
};
const formatedDLSIntensity = function (peaks, maxY) {
let decimal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2;
Expand Down Expand Up @@ -422,12 +422,6 @@ const peaksWrapper = function (layout, shift) {
};
}
const ops = spectraOps[layout];
if (layout === _list_layout.LIST_LAYOUT.EMISSIONS) {
return {
head: `${ops.head}${solvTxt}: λex = ${fixedWavelength} nm; λem = `,
tail: ops.tail
};
}
return {
head: `${ops.head}${solvTxt} = `,
tail: ops.tail
Expand Down
6 changes: 2 additions & 4 deletions src/helpers/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ const formatedEmissions = (

ordered = Object.keys(ordered).sort(sortFunc)
.map((k) => ({ x: k, y: ordered[k] }));
return ordered.map((o) => `${o.x}`).join(', ');
return `λex = ${fixedWavelength} nm; λem = ${ordered.map((o) => `${o.x}`)
.join(', ')}`;
};

const formatedDLSIntensity = (
Expand Down Expand Up @@ -347,9 +348,6 @@ const peaksWrapper = (layout, shift, atIndex = 0) => {
}

const ops = spectraOps[layout];
if (layout === LIST_LAYOUT.EMISSIONS) {
return { head: `${ops.head}${solvTxt}: λex = ${fixedWavelength} nm; λem = `, tail: ops.tail };
}
return { head: `${ops.head}${solvTxt} = `, tail: ops.tail };
};

Expand Down

0 comments on commit c3d0ca0

Please sign in to comment.