Skip to content

Commit

Permalink
Merge pull request #404 from olofsvensson/issue_401
Browse files Browse the repository at this point in the history
Issue #401 : Fix for missing PDB links
  • Loading branch information
olofsvensson authored Apr 23, 2018
2 parents db4b3eb + 885ab1a commit 84486da
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions js/mx/view/phasingview/phasinggridview.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,15 @@ PhasingGridView.prototype.printHTML = function(target) {
phasingStep[singleMetric[j].replace(/ /g, '_')] = values[j];
}
}
if (phasingStep.png){
if (phasingStep.png){
/** It might happens that there are two PDB like:"159386,159388" */
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);
var phasingStepPngs = phasingStep.png.split(",");
var fileTypes = phasingStep.fileType.split(",");
for (var z=0; z < fileTypes.length; z++){
/** Exclude other file types than IMAGE */
if (fileTypes[z] == "IMAGE") {
phasingStep.pngURL = EXI.getDataAdapter().mx.phasing.getPhasingFilesByPhasingProgramAttachmentIdAsImage(phasingStepPngs[z]);
}
}
}
phasingStep.spaceGroup = phasingStep.SpaceGroup_spaceGroupShortName;
Expand Down

0 comments on commit 84486da

Please sign in to comment.