Skip to content

Commit

Permalink
Merge pull request #38 from eurunuela/fix/missing_figures
Browse files Browse the repository at this point in the history
[FIX] Solved missing figure bug
  • Loading branch information
eurunuela authored Feb 16, 2022
2 parents 8626489 + 5f22c33 commit c884156
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rica",
"version": "1.0.7",
"version": "1.0.8",
"private": true,
"dependencies": {
"@blueprintjs/core": "^3.53.0",
Expand Down
12 changes: 10 additions & 2 deletions src/Plots/Plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,11 @@ class Plots extends React.Component {
// Get component name of selected component
var compName = this.state.variance.labels[index].match(/\d/g);
compName = compName.join("");
compName = `comp_0${compName}.png`;
// If length of compName is 2, then add a 0 to the beginning
if (compName.length === 2) {
compName = "0" + compName;
}
compName = `comp_${compName}.png`;

// iterate over each element in the array to retrieve image of selected component based on name
for (var i = 0; i < this.props.componentFigures.length; i++) {
Expand Down Expand Up @@ -228,7 +232,11 @@ class Plots extends React.Component {
// Get component name of selected component
var compName = this.state.kappaRho.labels[index].match(/\d/g);
compName = compName.join("");
compName = `comp_0${compName}.png`;
// If length of compName is 2, then add a 0 to the beginning
if (compName.length === 2) {
compName = "0" + compName;
}
compName = `comp_${compName}.png`;

// iterate over each element in the array to retrieve image of selected component based on name
for (var i = 0; i < this.props.componentFigures.length; i++) {
Expand Down

0 comments on commit c884156

Please sign in to comment.