Skip to content

Commit

Permalink
Merge pull request #33 in STRUC/icn3d from release133 to master
Browse files Browse the repository at this point in the history
* commit '43ac857c9619de7180d67a5a2f8a0181592dcaf6':
  enable to export canvas in a url
  • Loading branch information
jiywang3 committed Nov 15, 2016
2 parents 6aac2e0 + 43ac857 commit adb3155
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ gulp gh-pages

## Change log

The production version [icn3d-1.3.3](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-1.3.3.zip) was release on November 15, 2016. Now users can save the image with "transparent" background.
The production version [icn3d-1.3.3](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-1.3.3.zip) was release on November 15, 2016. Now users can save the image with "transparent" background using a single url, e.g., [https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?mmdbid=2por&width=300&height=300&command=set%20background%20transparent;%20export%20canvas](https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?mmdbid=2por&width=300&height=300&command=set%20background%20transparent;%20export%20canvas).

The production version [icn3d-1.3.2](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-1.3.2.zip) was release on October 18, 2016. The atom specification in "Advanced set selection" was modified to use "$" instead of "#" in front of structure IDs. This modification avoids to the problem of showing multiple "#" in the urls of "Share Link".

Expand Down
4 changes: 2 additions & 2 deletions icn3d.html
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ <h2>Commands for the advanced interface<img src="https://www.ncbi.nlm.nih.gov/St

<tr><td colspan="2">d) Save File</td></tr>
<tr><td><span class="indent">State File:</span></td> <td>[no command available]</td></tr>
<tr><td><span class="indent">PNG Image File:</span></td> <td>[no command available]</td></tr>
<tr><td><span class="indent">PNG Image File:</span></td> <td>export canvas</td></tr>
<tr><td><span class="indent">All Selections:</span></td> <td>[no command available]</td></tr>
<tr><td><span class="indent">Residue Counts:</span></td> <td>[no command available]</td></tr>

Expand Down Expand Up @@ -1520,7 +1520,7 @@ <h2>API Documents of the advanced UI library iCn3DUI<img src="https://www.ncbi.n
<a name="log"></a>
<h2>Change Log:<img src="https://www.ncbi.nlm.nih.gov/Structure/IMG/spacer.gif" width="25" height="1" border="0"><a href="#Top"><img src="https://www.ncbi.nlm.nih.gov/Structure/IMG/arrowup_blue.gif" width="12" height="12" border="0" alt="back to top"></a></h2>

The production version <a href="https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-1.3.3.zip">icn3d-1.3.3</a> was release on November 15, 2016. Now users can save the image with "transparent" background.
The production version <a href="https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-1.3.3.zip">icn3d-1.3.3</a> was release on November 15, 2016. Now users can save the image with "transparent" background using a single url, e.g., <a href="https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?mmdbid=2por&width=300&height=300&command=set%20background%20transparent;%20export%20canvas">https://www.ncbi.nlm.nih.gov/Structure/icn3d/full.html?mmdbid=2por&width=300&height=300&command=set%20background%20transparent;%20export%20canvas</a>.
<br><br>

The production version <a href="https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-1.3.2.zip">icn3d-1.3.2</a> was release on October 18, 2016. The atom specification in "Advanced set selection" was modified to use "$" instead of "#" in front of structure IDs. This modification avoids to the problem of showing multiple "#" in the urls of "Share Link".
Expand Down
5 changes: 5 additions & 0 deletions src/icn3dui/full_ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2583,6 +2583,11 @@ iCn3DUI.prototype = {
if(command.indexOf('export state file') !== -1) { // last step to update transformation
// the last transformation will be applied
}
else if(command.indexOf('export canvas') !== -1) {
setTimeout(function(){
me.saveFile('canvas.png', 'png');
}, 500);
}
else if(commandOri.indexOf('select structure') !== -1) {
var idArray = commandOri.substr(commandOri.lastIndexOf(' ') + 1).split(',');
if(idArray !== null) me.changeStructureid(idArray);
Expand Down

0 comments on commit adb3155

Please sign in to comment.