Skip to content

Commit

Permalink
Merge pull request #399 from olofsvensson/issue_398
Browse files Browse the repository at this point in the history
Issue #398 : Now only set phasingStep.png and phasingStep.pngURL if fileType = "IMAGE"
  • Loading branch information
antolinos authored Apr 18, 2018
2 parents a741fb9 + f5f14d3 commit 415750d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions js/mx/view/phasingview/phasinggridview.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ PhasingGridView.prototype.printHTML = function(target) {


/**
* This funcitons adds the metrics into the dicctionary and also the PNG
* This function adds the metrics into the dictionary and also the PNG
*/
function getMetrics(phasingStep){
if (phasingStep.metric){
Expand All @@ -91,8 +91,12 @@ PhasingGridView.prototype.printHTML = function(target) {
}
if (phasingStep.png){
/** It might happens that there are two PDB like:"159386,159388" */
phasingStep.png = phasingStep.png.split(",")[0];
phasingStep.pngURL = EXI.getDataAdapter().mx.phasing.getPhasingFilesByPhasingProgramAttachmentIdAsImage(phasingStep.png);
fileType = phasingStep.fileType.split(",")[0];
/** Exclude other file types than IMAGE */
if (fileType == "IMAGE") {
phasingStep.png = phasingStep.png.split(",")[0];
phasingStep.pngURL = EXI.getDataAdapter().mx.phasing.getPhasingFilesByPhasingProgramAttachmentIdAsImage(phasingStep.png);
}
}
phasingStep.spaceGroup = phasingStep.SpaceGroup_spaceGroupShortName;
return (phasingStep);
Expand Down

0 comments on commit 415750d

Please sign in to comment.