Skip to content

Commit

Permalink
Issue #401 : Fix for missing PDB links
Browse files Browse the repository at this point in the history
  • Loading branch information
Olof Svensson committed Apr 23, 2018
1 parent db4b3eb commit 885ab1a
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 885ab1a

Please sign in to comment.