diff --git a/README.md b/README.md index 2ebf1e16..43395516 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ We provided two types of iCn3D widgets: [basic interface](https://www.ncbi.nlm.n Either of these widgets could be easily added to your own web pages. Please see the [help page](https://www.ncbi.nlm.nih.gov/Structure/icn3d/docs/icn3d_help.html#HowToUse) for more details. -Complete package of iCn3D including Three.js and jQuery can be downloaded from [https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-2.2.3.zip](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-2.2.3.zip). The "Download ZIP" link in this page does not include third-party libraries. +Complete package of iCn3D including Three.js and jQuery can be downloaded from [https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-2.2.4.zip](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-2.2.4.zip). The "Download ZIP" link in this page does not include third-party libraries. ## Usage @@ -72,6 +72,8 @@ gulp ``` ## Change log +The production version [icn3d-2.2.4](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-2.2.4.zip) was release on September 6, 2018. The location of 2D interaction dialog was optimized. + The production version [icn3d-2.2.3](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-2.2.3.zip) was release on August 30, 2018. Added an option to show N- and C-terminal labels. The production version [icn3d-2.2.2](https://www.ncbi.nlm.nih.gov/Structure/icn3d/icn3d-2.2.2.zip) was release on August 9, 2018. Defined sets can be combined using "or", "and", and "not". diff --git a/icn3d.html b/icn3d.html index b7c27674..d1be4940 100644 --- a/icn3d.html +++ b/icn3d.html @@ -760,7 +760,7 @@

Menus, Commands, and Methods of the advanced interfaceper Selection: add label [label text] | size [label size] | color [FF0000] | background [FFFFFF] addLabel per Residue: add residue labels addResiudeLabels per Chain: add chain labels addLabel -N- & C- Termini: add terminal labels addTerminiLabels +N- & C- Termini: add terminal labels addTerminiLabels Remove: set labels off addChainLabels
k) View -> Reset: @@ -1405,6 +1405,9 @@

Methods    



addStabilizer()    
Add stabilizers in the model for 3D printing. This is especially important for the cartoon display such as ribbons. +addTerminiLabels(atomHash)    
+Display the terminal labels for the atoms in "atomHash". The termini of proteins are labeld as "N-" and "C-". The termini of nucleotides are labeled as "5'" and "3'". +

allCustomEvents()    
You can add your custom events in this function if you want to add new links in the function setTools. @@ -1722,6 +1725,9 @@

Methods    

Change Log:back to top

+The production version icn3d-2.2.4 was release on September 6, 2018. The location of 2D interaction dialog was optimized. +

+ The production version icn3d-2.2.3 was release on August 30, 2018. Added an option to show N- and C-terminal labels.

diff --git a/package.json b/package.json index 261b3ec1..7d0fdb7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "icn3d", - "version": "2.2.3", + "version": "2.2.4", "description": "iCn3D Structure Viewer", "main": "index.html", "scripts": { @@ -22,7 +22,7 @@ "dependencies": { "jquery": "~3.2.1", "jquery-ui": "components/jqueryui.git#1.12.1", - "three": "~0.80.0" + "three": "~0.80.1" }, "devDependencies": { "del": "^2.2.0", diff --git a/src/icn3dui/html/dialogs.js b/src/icn3dui/html/dialogs.js index 5e7dd418..769a4958 100644 --- a/src/icn3dui/html/dialogs.js +++ b/src/icn3dui/html/dialogs.js @@ -48,7 +48,7 @@ iCn3DUI.prototype.openDialogHalfWindow = function (id, title, dialogWidth, bForc if(bTwoddgmInit2 || bSetsInit2) { me.resizeCanvas(me.WIDTH - me.LESSWIDTH - twoddgmWidth, me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT, true); - if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm'); + if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm', undefined, bSetsInit2); if(bSetsInit2) me.openDialog2Ddgm(me.pre + 'dl_definedsets'); } else { @@ -64,7 +64,7 @@ iCn3DUI.prototype.openDialogHalfWindow = function (id, title, dialogWidth, bForc }); }; -iCn3DUI.prototype.openDialog2Ddgm = function (id, inHeight) { var me = this; +iCn3DUI.prototype.openDialog2Ddgm = function (id, inHeight, bDefinedSets) { var me = this; var twoddgmWidth = 170; var at, title; if(id === me.pre + 'dl_definedsets') { @@ -72,7 +72,13 @@ iCn3DUI.prototype.openDialog2Ddgm = function (id, inHeight) { var me = this; title = 'Select sets'; } else if(id === me.pre + 'dl_2ddgm') { - at = "right top+190"; + if(bDefinedSets !== undefined && bDefinedSets) { + at = "right top+240"; + } + else { + at = "right top"; + } + title = 'Interactions'; } @@ -132,7 +138,7 @@ iCn3DUI.prototype.openDialog = function (id, title) { var me = this; if(bTwoddgmInit2 || bSetsInit2) { me.resizeCanvas(me.WIDTH - me.LESSWIDTH - dialogWidth - twoddgmWidth, me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT, true); - if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm'); + if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm', undefined, bSetsInit2); if(bSetsInit2) me.openDialog2Ddgm(me.pre + 'dl_definedsets'); } } @@ -153,6 +159,7 @@ iCn3DUI.prototype.openDialog = function (id, title) { var me = this; modal: false, position: position, close: function(e) { +/* // determine whether dialogs initilaized var bSelectannotationsInit = $('#' + me.pre + 'dl_selectannotations').hasClass('ui-dialog-content'); // initialized var bAlignmentInit = $('#' + me.pre + 'dl_alignment').hasClass('ui-dialog-content'); // initialized @@ -164,6 +171,7 @@ iCn3DUI.prototype.openDialog = function (id, title) { var me = this; if(bAlignmentInit) bAlignmentInit2 = $('#' + me.pre + 'dl_alignment').dialog( 'isOpen' ); if(bTwoddgmInit) bTwoddgmInit2 = $('#' + me.pre + 'dl_2ddgm').dialog( 'isOpen' ); if(bSetsInit) bSetsInit2 = $('#' + me.pre + 'dl_definedsets').dialog( 'isOpen' ); +*/ if((id === me.pre + 'dl_selectannotations' && (!bAlignmentInit2) ) || (id === me.pre + 'dl_alignment' &&(!bSelectannotationsInit2) ) @@ -171,7 +179,7 @@ iCn3DUI.prototype.openDialog = function (id, title) { var me = this; if(bTwoddgmInit2 || bSetsInit2) { me.resizeCanvas(me.WIDTH - me.LESSWIDTH - twoddgmWidth, me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT, true); - if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm'); + if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm', undefined, bSetsInit2); if(bSetsInit2) me.openDialog2Ddgm(me.pre + 'dl_definedsets'); } else { @@ -187,6 +195,24 @@ iCn3DUI.prototype.openDialog = function (id, title) { var me = this; }); } } + else if(id === me.pre + 'dl_2ddgm') { + var tmpWidth = 0; + + if(me.WIDTH - me.LESSWIDTH >= me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT) { + if(bSelectannotationsInit2 || bAlignmentInit2) { + tmpWidth = 0.5 * (me.WIDTH - me.LESSWIDTH) - twoddgmWidth * 0.5; + } + me.resizeCanvas(me.WIDTH - me.LESSWIDTH - tmpWidth - twoddgmWidth, me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT, true); + + me.openDialog2Ddgm(id, undefined, bSetsInit2); + } + else { + me.resizeCanvas(me.WIDTH - me.LESSWIDTH - tmpWidth - twoddgmWidth, (me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT)*0.5, true); + me.openDialog2Ddgm(id, (me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT)*0.5); + + me.openDialog2Ddgm(id, (me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT)*0.5, bSetsInit2); + } + } else { height = 'auto'; width = 'auto'; @@ -197,18 +223,23 @@ iCn3DUI.prototype.openDialog = function (id, title) { var me = this; var position; - if(id === me.pre + 'dl_2ddgm' || id === me.pre + 'dl_definedsets') { + if(id === me.pre + 'dl_definedsets') { var tmpWidth = 0; + if(me.WIDTH - me.LESSWIDTH >= me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT) { if(bSelectannotationsInit2 || bAlignmentInit2) { tmpWidth = 0.5 * (me.WIDTH - me.LESSWIDTH) - twoddgmWidth * 0.5; } me.resizeCanvas(me.WIDTH - me.LESSWIDTH - tmpWidth - twoddgmWidth, me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT, true); me.openDialog2Ddgm(id); + + if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm', undefined, true); } else { me.resizeCanvas(me.WIDTH - me.LESSWIDTH - tmpWidth - twoddgmWidth, (me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT)*0.5, true); me.openDialog2Ddgm(id, (me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT)*0.5); + + if(bTwoddgmInit2) me.openDialog2Ddgm(me.pre + 'dl_2ddgm', (me.HEIGHT - me.LESSHEIGHT - me.EXTRAHEIGHT)*0.5, true); } } else {