icn3d 3.48.0 → 3.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icn3d.js +22 -19
- package/icn3d.min.js +2 -2
- package/icn3d.module.js +22 -19
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -80411,7 +80411,7 @@ class Strand {
|
|
|
80411
80411
|
let bShowArray = [];
|
|
80412
80412
|
let calphaIdArray = []; // used to store one of the final positions drawn in 3D
|
|
80413
80413
|
let colors = [];
|
|
80414
|
-
let currentChain, currentCA = null, currentO = null, currentColor = null, prevCoorCA = null, prevCoorO = null, prevColor = null;
|
|
80414
|
+
let currentChain, currentStyle, currentCA = null, currentO = null, currentColor = null, prevCoorCA = null, prevCoorO = null, prevColor = null;
|
|
80415
80415
|
let prevCO = null, ss = null, ssend = false, atomid = null, prevAtomid = null, prevResi = null, calphaid = null, prevCalphaid = null;
|
|
80416
80416
|
let strandWidth, bSheetSegment = false, bHelixSegment = false;
|
|
80417
80417
|
let atom, tubeAtoms = {};
|
|
@@ -80464,15 +80464,15 @@ class Strand {
|
|
|
80464
80464
|
}
|
|
80465
80465
|
// smoothen each coil, helix and sheet separately. The joint residue has to be included both in the previous and next segment
|
|
80466
80466
|
let bSameChain = true;
|
|
80467
|
-
|
|
80467
|
+
|
|
80468
80468
|
if (currentChain !== atom.chain) {
|
|
80469
80469
|
bSameChain = false;
|
|
80470
80470
|
}
|
|
80471
80471
|
|
|
80472
|
-
if(atom.ssend && atom.ss === 'sheet') {
|
|
80472
|
+
if((atom.ssend || currentStyle != atom.style)&& atom.ss === 'sheet') {
|
|
80473
80473
|
bSheetSegment = true;
|
|
80474
80474
|
}
|
|
80475
|
-
else if(atom.ssend && atom.ss === 'helix') {
|
|
80475
|
+
else if((atom.ssend || currentStyle != atom.style) && atom.ss === 'helix') {
|
|
80476
80476
|
bHelixSegment = true;
|
|
80477
80477
|
}
|
|
80478
80478
|
|
|
@@ -80565,7 +80565,7 @@ class Strand {
|
|
|
80565
80565
|
// bHelixSegment = true;
|
|
80566
80566
|
// }
|
|
80567
80567
|
|
|
80568
|
-
if ((atom.ssbegin || atom.ssend || (drawnResidueCount === totalResidueCount - 1) || bBrokenSs) && pnts[0].length > 0 && bSameChain) {
|
|
80568
|
+
if ((atom.ssbegin || atom.ssend || (drawnResidueCount === totalResidueCount - 1) || bBrokenSs || currentStyle != atom.style) && pnts[0].length > 0 && bSameChain) {
|
|
80569
80569
|
let atomName = 'CA';
|
|
80570
80570
|
|
|
80571
80571
|
let prevone = [], nexttwo = [];
|
|
@@ -80708,9 +80708,7 @@ class Strand {
|
|
|
80708
80708
|
} // end if (atom.ssbegin || atom.ssend)
|
|
80709
80709
|
|
|
80710
80710
|
// end of a chain
|
|
80711
|
-
|
|
80712
|
-
if ((currentChain !== atom.chain) && pnts[0].length > 0) {
|
|
80713
|
-
|
|
80711
|
+
if ((currentChain !== atom.chain || currentStyle != atom.style) && pnts[0].length > 0) {
|
|
80714
80712
|
let atomName = 'CA';
|
|
80715
80713
|
|
|
80716
80714
|
let prevone = [], nexttwo = [];
|
|
@@ -80762,7 +80760,7 @@ class Strand {
|
|
|
80762
80760
|
}
|
|
80763
80761
|
|
|
80764
80762
|
currentChain = atom.chain;
|
|
80765
|
-
atom.
|
|
80763
|
+
currentStyle = atom.style;
|
|
80766
80764
|
ss = atom.ss;
|
|
80767
80765
|
ssend = atom.ssend;
|
|
80768
80766
|
prevAtomid = atom.serial;
|
|
@@ -89729,6 +89727,9 @@ class SetStyle {
|
|
|
89729
89727
|
setBackground(color) {var ic = this.icn3d, me = ic.icn3dui;
|
|
89730
89728
|
|
|
89731
89729
|
ic.setOptionCls.setOption('background', color);
|
|
89730
|
+
let exdays = 3650;
|
|
89731
|
+
me.htmlCls.setHtmlCls.setCookie('bkgdcolor', color, exdays);
|
|
89732
|
+
|
|
89732
89733
|
me.htmlCls.clickMenuCls.setLogCmd('set background ' + color, true);
|
|
89733
89734
|
//let titleColor =(color == 'black' || color == 'transparent') ? me.htmlCls.GREYD : 'black';
|
|
89734
89735
|
let titleColor = (color == 'black') ? me.htmlCls.GREYD : 'black';
|
|
@@ -119176,16 +119177,18 @@ class ApplyCommand {
|
|
|
119176
119177
|
}
|
|
119177
119178
|
else if(command.indexOf('set background') == 0) {
|
|
119178
119179
|
let value = command.substr(command.lastIndexOf(' ') + 1);
|
|
119179
|
-
ic.
|
|
119180
|
+
ic.setStyleCls.setBackground(value);
|
|
119180
119181
|
|
|
119181
|
-
|
|
119182
|
-
|
|
119183
|
-
|
|
119184
|
-
|
|
119185
|
-
|
|
119186
|
-
|
|
119187
|
-
|
|
119188
|
-
|
|
119182
|
+
// ic.opts['background'] = value;
|
|
119183
|
+
|
|
119184
|
+
// if(value == 'black') {
|
|
119185
|
+
// $("#" + ic.pre + "title").css("color", me.htmlCls.GREYD);
|
|
119186
|
+
// $("#" + ic.pre + "titlelink").css("color", me.htmlCls.GREYD);
|
|
119187
|
+
// }
|
|
119188
|
+
// else {
|
|
119189
|
+
// $("#" + ic.pre + "title").css("color", "black");
|
|
119190
|
+
// $("#" + ic.pre + "titlelink").css("color", "black");
|
|
119191
|
+
// }
|
|
119189
119192
|
}
|
|
119190
119193
|
else if(command.indexOf('set label color') == 0) {
|
|
119191
119194
|
ic.labelcolor = command.substr(command.lastIndexOf(' ') + 1);
|
|
@@ -135425,7 +135428,7 @@ class iCn3DUI {
|
|
|
135425
135428
|
//even when multiple iCn3D viewers are shown together.
|
|
135426
135429
|
this.pre = this.cfg.divid + "_";
|
|
135427
135430
|
|
|
135428
|
-
this.REVISION = '3.48.
|
|
135431
|
+
this.REVISION = '3.48.1';
|
|
135429
135432
|
|
|
135430
135433
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
135431
135434
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|