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.js
CHANGED
|
@@ -79510,7 +79510,7 @@ class Strand {
|
|
|
79510
79510
|
let bShowArray = [];
|
|
79511
79511
|
let calphaIdArray = []; // used to store one of the final positions drawn in 3D
|
|
79512
79512
|
let colors = [];
|
|
79513
|
-
let currentChain, currentCA = null, currentO = null, currentColor = null, prevCoorCA = null, prevCoorO = null, prevColor = null;
|
|
79513
|
+
let currentChain, currentStyle, currentCA = null, currentO = null, currentColor = null, prevCoorCA = null, prevCoorO = null, prevColor = null;
|
|
79514
79514
|
let prevCO = null, ss = null, ssend = false, atomid = null, prevAtomid = null, prevResi = null, calphaid = null, prevCalphaid = null;
|
|
79515
79515
|
let strandWidth, bSheetSegment = false, bHelixSegment = false;
|
|
79516
79516
|
let atom, tubeAtoms = {};
|
|
@@ -79563,15 +79563,15 @@ class Strand {
|
|
|
79563
79563
|
}
|
|
79564
79564
|
// smoothen each coil, helix and sheet separately. The joint residue has to be included both in the previous and next segment
|
|
79565
79565
|
let bSameChain = true;
|
|
79566
|
-
|
|
79566
|
+
|
|
79567
79567
|
if (currentChain !== atom.chain) {
|
|
79568
79568
|
bSameChain = false;
|
|
79569
79569
|
}
|
|
79570
79570
|
|
|
79571
|
-
if(atom.ssend && atom.ss === 'sheet') {
|
|
79571
|
+
if((atom.ssend || currentStyle != atom.style)&& atom.ss === 'sheet') {
|
|
79572
79572
|
bSheetSegment = true;
|
|
79573
79573
|
}
|
|
79574
|
-
else if(atom.ssend && atom.ss === 'helix') {
|
|
79574
|
+
else if((atom.ssend || currentStyle != atom.style) && atom.ss === 'helix') {
|
|
79575
79575
|
bHelixSegment = true;
|
|
79576
79576
|
}
|
|
79577
79577
|
|
|
@@ -79664,7 +79664,7 @@ class Strand {
|
|
|
79664
79664
|
// bHelixSegment = true;
|
|
79665
79665
|
// }
|
|
79666
79666
|
|
|
79667
|
-
if ((atom.ssbegin || atom.ssend || (drawnResidueCount === totalResidueCount - 1) || bBrokenSs) && pnts[0].length > 0 && bSameChain) {
|
|
79667
|
+
if ((atom.ssbegin || atom.ssend || (drawnResidueCount === totalResidueCount - 1) || bBrokenSs || currentStyle != atom.style) && pnts[0].length > 0 && bSameChain) {
|
|
79668
79668
|
let atomName = 'CA';
|
|
79669
79669
|
|
|
79670
79670
|
let prevone = [], nexttwo = [];
|
|
@@ -79807,9 +79807,7 @@ class Strand {
|
|
|
79807
79807
|
} // end if (atom.ssbegin || atom.ssend)
|
|
79808
79808
|
|
|
79809
79809
|
// end of a chain
|
|
79810
|
-
|
|
79811
|
-
if ((currentChain !== atom.chain) && pnts[0].length > 0) {
|
|
79812
|
-
|
|
79810
|
+
if ((currentChain !== atom.chain || currentStyle != atom.style) && pnts[0].length > 0) {
|
|
79813
79811
|
let atomName = 'CA';
|
|
79814
79812
|
|
|
79815
79813
|
let prevone = [], nexttwo = [];
|
|
@@ -79861,7 +79859,7 @@ class Strand {
|
|
|
79861
79859
|
}
|
|
79862
79860
|
|
|
79863
79861
|
currentChain = atom.chain;
|
|
79864
|
-
atom.
|
|
79862
|
+
currentStyle = atom.style;
|
|
79865
79863
|
ss = atom.ss;
|
|
79866
79864
|
ssend = atom.ssend;
|
|
79867
79865
|
prevAtomid = atom.serial;
|
|
@@ -88828,6 +88826,9 @@ class SetStyle {
|
|
|
88828
88826
|
setBackground(color) {var ic = this.icn3d, me = ic.icn3dui;
|
|
88829
88827
|
|
|
88830
88828
|
ic.setOptionCls.setOption('background', color);
|
|
88829
|
+
let exdays = 3650;
|
|
88830
|
+
me.htmlCls.setHtmlCls.setCookie('bkgdcolor', color, exdays);
|
|
88831
|
+
|
|
88831
88832
|
me.htmlCls.clickMenuCls.setLogCmd('set background ' + color, true);
|
|
88832
88833
|
//let titleColor =(color == 'black' || color == 'transparent') ? me.htmlCls.GREYD : 'black';
|
|
88833
88834
|
let titleColor = (color == 'black') ? me.htmlCls.GREYD : 'black';
|
|
@@ -118275,16 +118276,18 @@ class ApplyCommand {
|
|
|
118275
118276
|
}
|
|
118276
118277
|
else if(command.indexOf('set background') == 0) {
|
|
118277
118278
|
let value = command.substr(command.lastIndexOf(' ') + 1);
|
|
118278
|
-
ic.
|
|
118279
|
+
ic.setStyleCls.setBackground(value);
|
|
118279
118280
|
|
|
118280
|
-
|
|
118281
|
-
|
|
118282
|
-
|
|
118283
|
-
|
|
118284
|
-
|
|
118285
|
-
|
|
118286
|
-
|
|
118287
|
-
|
|
118281
|
+
// ic.opts['background'] = value;
|
|
118282
|
+
|
|
118283
|
+
// if(value == 'black') {
|
|
118284
|
+
// $("#" + ic.pre + "title").css("color", me.htmlCls.GREYD);
|
|
118285
|
+
// $("#" + ic.pre + "titlelink").css("color", me.htmlCls.GREYD);
|
|
118286
|
+
// }
|
|
118287
|
+
// else {
|
|
118288
|
+
// $("#" + ic.pre + "title").css("color", "black");
|
|
118289
|
+
// $("#" + ic.pre + "titlelink").css("color", "black");
|
|
118290
|
+
// }
|
|
118288
118291
|
}
|
|
118289
118292
|
else if(command.indexOf('set label color') == 0) {
|
|
118290
118293
|
ic.labelcolor = command.substr(command.lastIndexOf(' ') + 1);
|
|
@@ -134524,7 +134527,7 @@ class iCn3DUI {
|
|
|
134524
134527
|
//even when multiple iCn3D viewers are shown together.
|
|
134525
134528
|
this.pre = this.cfg.divid + "_";
|
|
134526
134529
|
|
|
134527
|
-
this.REVISION = '3.48.
|
|
134530
|
+
this.REVISION = '3.48.1';
|
|
134528
134531
|
|
|
134529
134532
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
134530
134533
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|