icn3d 3.5.0 → 3.6.0
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 +99 -61
- package/package.json +1 -1
package/icn3d.js
CHANGED
|
@@ -3952,7 +3952,7 @@ class ParasCls {
|
|
|
3952
3952
|
black: this.thr(0x000000),
|
|
3953
3953
|
grey: this.thr(0xCCCCCC),
|
|
3954
3954
|
white: this.thr(0xFFFFFF),
|
|
3955
|
-
transparent: this.thr(0x000000)
|
|
3955
|
+
transparent: this.thr(0xFFFFFF) //this.thr(0x000000)
|
|
3956
3956
|
};
|
|
3957
3957
|
|
|
3958
3958
|
this.residueColors = {
|
|
@@ -11887,7 +11887,8 @@ class ShareLink {
|
|
|
11887
11887
|
|
|
11888
11888
|
if(ic.commands.length > start) {
|
|
11889
11889
|
let command_tf = ic.commands[start].split('|||');
|
|
11890
|
-
|
|
11890
|
+
let command_tf2 = command_tf[0].split('&command=');
|
|
11891
|
+
prevCommandStr = command_tf2[0].trim();
|
|
11891
11892
|
|
|
11892
11893
|
//statefile += ic.commands[start] + "\n";
|
|
11893
11894
|
|
|
@@ -11898,7 +11899,8 @@ class ShareLink {
|
|
|
11898
11899
|
let tmpUrl = '';
|
|
11899
11900
|
for(let il = ic.commands.length; i < il; ++i) {
|
|
11900
11901
|
let command_tf = ic.commands[i].split('|||');
|
|
11901
|
-
let
|
|
11902
|
+
let command_tf2 = command_tf[0].split('&command=');
|
|
11903
|
+
let commandStr = command_tf2[0].trim();
|
|
11902
11904
|
|
|
11903
11905
|
//statefile += ic.commands[i] + "\n";
|
|
11904
11906
|
|
|
@@ -18412,8 +18414,15 @@ class ResidueLabels {
|
|
|
18412
18414
|
label.factor = 0.3;
|
|
18413
18415
|
|
|
18414
18416
|
let atomColorStr = atom.color.getHexString().toUpperCase();
|
|
18415
|
-
label.color = (ic.opts.background
|
|
18416
|
-
if(bSchematic) label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18417
|
+
//label.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18418
|
+
//if(bSchematic) label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18419
|
+
// don't change residue labels
|
|
18420
|
+
if(bNumber) {
|
|
18421
|
+
label.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd;
|
|
18422
|
+
}
|
|
18423
|
+
else {
|
|
18424
|
+
label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18425
|
+
}
|
|
18417
18426
|
label.background = background;
|
|
18418
18427
|
//label.alpha = alpha; // ic.labelCls.hideLabels() didn't work. Remove this line for now
|
|
18419
18428
|
|
|
@@ -18457,7 +18466,7 @@ class ResidueLabels {
|
|
|
18457
18466
|
label.text = atom.elem;
|
|
18458
18467
|
label.size = size;
|
|
18459
18468
|
|
|
18460
|
-
label.color = (ic.opts.background
|
|
18469
|
+
label.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : atom.color.getHexString();
|
|
18461
18470
|
label.background = background;
|
|
18462
18471
|
|
|
18463
18472
|
ic.labels['schematic'].push(label);
|
|
@@ -18495,7 +18504,7 @@ class ResidueLabels {
|
|
|
18495
18504
|
}
|
|
18496
18505
|
|
|
18497
18506
|
let atomColorStr = atom.color.getHexString().toUpperCase();
|
|
18498
|
-
label.color = (ic.opts.background
|
|
18507
|
+
label.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18499
18508
|
if(bElement) label.color = (atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
18500
18509
|
label.background = background;
|
|
18501
18510
|
|
|
@@ -19275,7 +19284,8 @@ class Scap {
|
|
|
19275
19284
|
if(!ic.alertAlt) {
|
|
19276
19285
|
ic.alertAlt = true;
|
|
19277
19286
|
|
|
19278
|
-
if(ic.bRender) var aaa = 1; //alert('Please press the letter "a" to alternate between wild type and mutant.');
|
|
19287
|
+
//if(ic.bRender) var aaa = 1; //alert('Please press the letter "a" to alternate between wild type and mutant.');
|
|
19288
|
+
var aaa = 1; //alert('Please press the letter "a" to alternate between wild type and mutant.');
|
|
19279
19289
|
}
|
|
19280
19290
|
}
|
|
19281
19291
|
|
|
@@ -19923,7 +19933,7 @@ class LoadPDB {
|
|
|
19923
19933
|
// modified from iview (http://istar.cse.cuhk.edu.hk/iview/)
|
|
19924
19934
|
//This PDB parser feeds the viewer with the content of a PDB file, pdbData.
|
|
19925
19935
|
loadPDB(src, pdbid, bOpm, bVector, bMutation, bAppend) { let ic = this.icn3d, me = ic.icn3dui;
|
|
19926
|
-
|
|
19936
|
+
let bNMR = false;
|
|
19927
19937
|
let lines = src.split('\n');
|
|
19928
19938
|
|
|
19929
19939
|
let chainsTmp = {}; // serial -> atom
|
|
@@ -20108,6 +20118,11 @@ class LoadPDB {
|
|
|
20108
20118
|
if(line.indexOf('1/2 of bilayer thickness:') !== -1) { // OPM transmembrane protein
|
|
20109
20119
|
ic.halfBilayerSize = parseFloat(line.substr(line.indexOf(':') + 1).trim());
|
|
20110
20120
|
}
|
|
20121
|
+
else if (type == 210) {
|
|
20122
|
+
if((line.substr(11, 32).trim() == 'EXPERIMENT TYPE') && line.substr(45).trim() == 'NMR') {
|
|
20123
|
+
bNMR = true;
|
|
20124
|
+
}
|
|
20125
|
+
}
|
|
20111
20126
|
else if (type == 350 && line.substr(13, 5) == 'BIOMT') {
|
|
20112
20127
|
let n = parseInt(line[18]) - 1;
|
|
20113
20128
|
//var m = parseInt(line.substr(21, 2));
|
|
@@ -20165,12 +20180,14 @@ class LoadPDB {
|
|
|
20165
20180
|
|
|
20166
20181
|
//helices = [];
|
|
20167
20182
|
//sheets = [];
|
|
20168
|
-
|
|
20169
|
-
|
|
20170
|
-
|
|
20171
|
-
|
|
20172
|
-
|
|
20173
|
-
|
|
20183
|
+
if(!bNMR) {
|
|
20184
|
+
sheetArray = [];
|
|
20185
|
+
sheetStart = [];
|
|
20186
|
+
sheetEnd = [];
|
|
20187
|
+
helixArray = [];
|
|
20188
|
+
helixStart = [];
|
|
20189
|
+
helixEnd = [];
|
|
20190
|
+
}
|
|
20174
20191
|
} else if (record === 'JRNL ') {
|
|
20175
20192
|
if(line.substr(12, 4) === 'PMID') {
|
|
20176
20193
|
ic.pmid = line.substr(19).trim();
|
|
@@ -20268,27 +20285,26 @@ class LoadPDB {
|
|
|
20268
20285
|
|
|
20269
20286
|
// Assign secondary structures from the input
|
|
20270
20287
|
// if a residue is assigned both sheet and helix, it is assigned as sheet
|
|
20271
|
-
if(
|
|
20288
|
+
if(this.isSecondary(residueNum, sheetArray, bNMR)) {
|
|
20272
20289
|
ic.atoms[serial].ss = 'sheet';
|
|
20273
|
-
|
|
20274
|
-
if($.inArray(residueNum, sheetStart) !== -1) {
|
|
20290
|
+
if(this.isSecondary(residueNum, sheetStart, bNMR)) {
|
|
20275
20291
|
ic.atoms[serial].ssbegin = true;
|
|
20276
20292
|
}
|
|
20277
20293
|
|
|
20278
20294
|
// do not use else if. Some residues are both start and end of secondary structure
|
|
20279
|
-
if(
|
|
20295
|
+
if(this.isSecondary(residueNum, sheetEnd, bNMR)) {
|
|
20280
20296
|
ic.atoms[serial].ssend = true;
|
|
20281
20297
|
}
|
|
20282
20298
|
}
|
|
20283
|
-
else if(
|
|
20299
|
+
else if(this.isSecondary(residueNum, helixArray, bNMR)) {
|
|
20284
20300
|
ic.atoms[serial].ss = 'helix';
|
|
20285
20301
|
|
|
20286
|
-
if(
|
|
20302
|
+
if(this.isSecondary(residueNum, helixStart, bNMR)) {
|
|
20287
20303
|
ic.atoms[serial].ssbegin = true;
|
|
20288
20304
|
}
|
|
20289
20305
|
|
|
20290
20306
|
// do not use else if. Some residues are both start and end of secondary structure
|
|
20291
|
-
if(
|
|
20307
|
+
if(this.isSecondary(residueNum, helixEnd, bNMR)) {
|
|
20292
20308
|
ic.atoms[serial].ssend = true;
|
|
20293
20309
|
}
|
|
20294
20310
|
}
|
|
@@ -20729,6 +20745,24 @@ class LoadPDB {
|
|
|
20729
20745
|
return {'chainresiCalphaHash': chainCalphaHash, 'center': ic.center.clone()}
|
|
20730
20746
|
}
|
|
20731
20747
|
|
|
20748
|
+
isSecondary(resid, residArray, bNMR) { let ic = this.icn3d; ic.icn3dui;
|
|
20749
|
+
if(!bNMR) {
|
|
20750
|
+
return $.inArray(resid, residArray) != -1;
|
|
20751
|
+
}
|
|
20752
|
+
else {
|
|
20753
|
+
let chain_resi = resid.substr(resid.indexOf('_') + 1);
|
|
20754
|
+
|
|
20755
|
+
let bFound = false;
|
|
20756
|
+
for(let i = 0, il = residArray.length; i < il; ++i) {
|
|
20757
|
+
if(chain_resi == residArray[i].substr(residArray[i].indexOf('_') + 1)) {
|
|
20758
|
+
bFound = true;
|
|
20759
|
+
break;
|
|
20760
|
+
}
|
|
20761
|
+
}
|
|
20762
|
+
|
|
20763
|
+
return bFound;
|
|
20764
|
+
}
|
|
20765
|
+
}
|
|
20732
20766
|
}
|
|
20733
20767
|
|
|
20734
20768
|
/**
|
|
@@ -28925,7 +28959,7 @@ class Analysis {
|
|
|
28925
28959
|
label.text = 'Chain ' + chainName + ': ' + proteinName;
|
|
28926
28960
|
label.size = size;
|
|
28927
28961
|
ic.firstAtomObjCls.getFirstCalphaAtomObj(ic.chains[chainid]).color.getHexString().toUpperCase();
|
|
28928
|
-
label.color = (ic.opts.background
|
|
28962
|
+
label.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomColorStr === "CCCCCC" || atomColorStr === "C8C8C8") ? "#888888" : "#" + atomColorStr;
|
|
28929
28963
|
label.background = background;
|
|
28930
28964
|
ic.labels['chain'].push(label);
|
|
28931
28965
|
}
|
|
@@ -28959,10 +28993,10 @@ class Analysis {
|
|
|
28959
28993
|
}
|
|
28960
28994
|
labelN.size = size;
|
|
28961
28995
|
labelC.size = size;
|
|
28962
|
-
|
|
28963
|
-
|
|
28964
|
-
labelN.color = (ic.opts.background
|
|
28965
|
-
labelC.color = (ic.opts.background
|
|
28996
|
+
firstAtom.color.getHexString().toUpperCase();
|
|
28997
|
+
lastAtom.color.getHexString().toUpperCase();
|
|
28998
|
+
labelN.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomNColorStr === "CCCCCC" || atomNColorStr === "C8C8C8") ? "#888888" : "#" + atomNColorStr;
|
|
28999
|
+
labelC.color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //(atomCColorStr === "CCCCCC" || atomCColorStr === "C8C8C8") ? "#888888" : "#" + atomCColorStr;
|
|
28966
29000
|
labelN.background = background;
|
|
28967
29001
|
labelC.background = background;
|
|
28968
29002
|
ic.labels['chain'].push(labelN);
|
|
@@ -29779,8 +29813,9 @@ class ApplyCommand {
|
|
|
29779
29813
|
ic.bAddCommands = false;
|
|
29780
29814
|
|
|
29781
29815
|
let commandTransformation = commandStr.split('|||');
|
|
29816
|
+
let commandTransformation2 = commandTransformation[0].split('%7C%7C%7C'); // sometimes encoded transformation is also included
|
|
29782
29817
|
|
|
29783
|
-
let commandOri =
|
|
29818
|
+
let commandOri = commandTransformation2[0].replace(/\s+/g, ' ').trim();
|
|
29784
29819
|
let command = commandOri.toLowerCase();
|
|
29785
29820
|
|
|
29786
29821
|
// exact match =============
|
|
@@ -30376,13 +30411,13 @@ class ApplyCommand {
|
|
|
30376
30411
|
let value = command.substr(command.lastIndexOf(' ') + 1);
|
|
30377
30412
|
ic.opts['background'] = value;
|
|
30378
30413
|
|
|
30379
|
-
if(value == '
|
|
30380
|
-
|
|
30381
|
-
|
|
30414
|
+
if(value == 'black') {
|
|
30415
|
+
$("#" + ic.pre + "title").css("color", me.htmlCls.GREYD);
|
|
30416
|
+
$("#" + ic.pre + "titlelink").css("color", me.htmlCls.GREYD);
|
|
30382
30417
|
}
|
|
30383
30418
|
else {
|
|
30384
|
-
|
|
30385
|
-
|
|
30419
|
+
$("#" + ic.pre + "title").css("color", "black");
|
|
30420
|
+
$("#" + ic.pre + "titlelink").css("color", "black");
|
|
30386
30421
|
}
|
|
30387
30422
|
}
|
|
30388
30423
|
else if(commandOri.indexOf('set thickness') == 0) {
|
|
@@ -34178,7 +34213,7 @@ class HlSeq {
|
|
|
34178
34213
|
|
|
34179
34214
|
//var size = parseInt(ic.LABELSIZE * 10 / commandname.length);
|
|
34180
34215
|
let size = ic.LABELSIZE;
|
|
34181
|
-
let color = (ic.opts.background
|
|
34216
|
+
let color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //"FFFF00";
|
|
34182
34217
|
if(position !== undefined) ic.analysisCls.addLabel(commanddescr, position.center.x, position.center.y, position.center.z, size, color, undefined, 'custom');
|
|
34183
34218
|
|
|
34184
34219
|
ic.drawCls.draw();
|
|
@@ -34582,7 +34617,7 @@ class ShowAnno {
|
|
|
34582
34617
|
$.ajax(this);
|
|
34583
34618
|
return;
|
|
34584
34619
|
}
|
|
34585
|
-
|
|
34620
|
+
thisClass.enableHlSeq();
|
|
34586
34621
|
console.log( "No data were found for the protein " + chnidBaseArray + "..." );
|
|
34587
34622
|
for(let chnid in ic.protein_chainid) {
|
|
34588
34623
|
let chnidBase = ic.protein_chainid[chnid];
|
|
@@ -35272,7 +35307,7 @@ class AnnoDomain {
|
|
|
35272
35307
|
}
|
|
35273
35308
|
ic.showAnnoCls.enableHlSeq();
|
|
35274
35309
|
ic.bAjax3ddomain = true;
|
|
35275
|
-
bAjaxDone1 = true;
|
|
35310
|
+
//bAjaxDone1 = true;
|
|
35276
35311
|
if(ic.deferred3ddomain !== undefined) {
|
|
35277
35312
|
if(me.cfg.align === undefined || me.cfg.chainalign === undefined) {
|
|
35278
35313
|
ic.deferred3ddomain.resolve();
|
|
@@ -35485,7 +35520,7 @@ class AnnoSnpClinVar {
|
|
|
35485
35520
|
ic.labels['clinvar'] = [];
|
|
35486
35521
|
//var size = Math.round(ic.LABELSIZE * 10 / label.length);
|
|
35487
35522
|
let size = ic.LABELSIZE;
|
|
35488
|
-
let color = (ic.opts.background
|
|
35523
|
+
let color = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd; //"#FFFF00";
|
|
35489
35524
|
ic.analysisCls.addLabel(label, position.center.x + 1, position.center.y + 1, position.center.z + 1, size, color, undefined, 'clinvar');
|
|
35490
35525
|
ic.hAtoms = {};
|
|
35491
35526
|
for(let j in ic.residues[residueid]) {
|
|
@@ -38918,7 +38953,8 @@ class SetStyle {
|
|
|
38918
38953
|
setBackground(color) {var ic = this.icn3d, me = ic.icn3dui;
|
|
38919
38954
|
ic.setOptionCls.setOption('background', color);
|
|
38920
38955
|
me.htmlCls.clickMenuCls.setLogCmd('set background ' + color, true);
|
|
38921
|
-
let titleColor =(color == 'black' || color == 'transparent') ? me.htmlCls.GREYD : 'black';
|
|
38956
|
+
//let titleColor =(color == 'black' || color == 'transparent') ? me.htmlCls.GREYD : 'black';
|
|
38957
|
+
let titleColor = (color == 'black') ? me.htmlCls.GREYD : 'black';
|
|
38922
38958
|
$("#" + ic.pre + "title").css("color", titleColor);
|
|
38923
38959
|
$("#" + ic.pre + "titlelink").css("color", titleColor);
|
|
38924
38960
|
}
|
|
@@ -39468,7 +39504,7 @@ class TextSprite {
|
|
|
39468
39504
|
// default yellow
|
|
39469
39505
|
//let textColor = parameters.hasOwnProperty("textColor") && parameters["textColor"] !== undefined ? me.utilsCls.hexToRgb(parameters["textColor"], textAlpha) : { r:255, g:255, b:0, a:1.0 };
|
|
39470
39506
|
// default black or white
|
|
39471
|
-
let defaultColor = (
|
|
39507
|
+
let defaultColor = (ic.opts.background != 'black') ? { r:0, g:0, b:0, a:1.0 } : { r:255, g:255, b:0, a:1.0 };
|
|
39472
39508
|
let textColor = parameters.hasOwnProperty("textColor") && parameters["textColor"] !== undefined ? me.utilsCls.hexToRgb(parameters["textColor"], textAlpha)
|
|
39473
39509
|
: defaultColor;
|
|
39474
39510
|
if(!textColor) textColor = defaultColor;
|
|
@@ -39608,7 +39644,7 @@ class Label {
|
|
|
39608
39644
|
|
|
39609
39645
|
for(let name in labels) {
|
|
39610
39646
|
let labelArray = (labels[name] !== undefined) ? labels[name] : [];
|
|
39611
|
-
let defaultColor = (ic.opts.background
|
|
39647
|
+
let defaultColor = (ic.opts.background != 'black') ? ic.colorWhitebkgd : ic.colorBlackbkgd;
|
|
39612
39648
|
|
|
39613
39649
|
for (let i = 0, il = labelArray.length; i < il; ++i) {
|
|
39614
39650
|
let label = labelArray[i];
|
|
@@ -39986,10 +40022,10 @@ class ApplyDisplay {
|
|
|
39986
40022
|
if(labelArray) {
|
|
39987
40023
|
for(let i = 0, il = labelArray.length; i < il; ++i) {
|
|
39988
40024
|
let label = labelArray[i];
|
|
39989
|
-
if((ic.opts.background
|
|
40025
|
+
if((ic.opts.background != 'black') && label.color == ic.colorBlackbkgd) {
|
|
39990
40026
|
label.color = ic.colorWhitebkgd;
|
|
39991
40027
|
}
|
|
39992
|
-
else if((ic.opts.background == 'black'
|
|
40028
|
+
else if((ic.opts.background == 'black') && label.color == ic.colorWhitebkgd) {
|
|
39993
40029
|
label.color = ic.colorBlackbkgd;
|
|
39994
40030
|
}
|
|
39995
40031
|
}
|
|
@@ -43266,7 +43302,7 @@ class SaveFile {
|
|
|
43266
43302
|
if(ic.molTitle !== undefined && ic.molTitle !== '') {
|
|
43267
43303
|
let title = ic.molTitle;
|
|
43268
43304
|
|
|
43269
|
-
let titlelinkColor =(ic.opts['background'] == '
|
|
43305
|
+
let titlelinkColor =(ic.opts['background'] == 'black') ? me.htmlCls.GREYD : 'black';
|
|
43270
43306
|
|
|
43271
43307
|
if(ic.inputid === undefined) {
|
|
43272
43308
|
if(ic.molTitle.length > 40) title = ic.molTitle.substr(0, 40) + "...";
|
|
@@ -45430,6 +45466,8 @@ class SetMenu {
|
|
|
45430
45466
|
setTopMenusHtml(id, str1, str2) { let me = this.icn3dui;
|
|
45431
45467
|
if(me.bNode) return '';
|
|
45432
45468
|
|
|
45469
|
+
let titleColor =(me.htmlCls.opts['background'] == 'black') ? me.htmlCls.GREYD : 'black';
|
|
45470
|
+
|
|
45433
45471
|
let html = "";
|
|
45434
45472
|
|
|
45435
45473
|
html += "<div style='position:relative;'>";
|
|
@@ -45473,7 +45511,7 @@ class SetMenu {
|
|
|
45473
45511
|
html += this.setTools();
|
|
45474
45512
|
|
|
45475
45513
|
// show title at the top left corner
|
|
45476
|
-
html += me.htmlCls.divStr + "title' class='icn3d-commandTitle' style='font-size:1.2em; font-weight:normal; position:absolute; z-index:1; float:left; display:table-row; margin: 85px 0px 0px 5px; color:" +
|
|
45514
|
+
html += me.htmlCls.divStr + "title' class='icn3d-commandTitle' style='font-size:1.2em; font-weight:normal; position:absolute; z-index:1; float:left; display:table-row; margin: 85px 0px 0px 5px; color:" + titleColor + "; width:" + me.htmlCls.WIDTH + "px'></div>";
|
|
45477
45515
|
|
|
45478
45516
|
html += me.htmlCls.divStr + "viewer' style='position:relative; width:100%; height:100%; background-color: " + me.htmlCls.GREYD + ";'>";
|
|
45479
45517
|
|
|
@@ -45490,7 +45528,7 @@ class SetMenu {
|
|
|
45490
45528
|
let tmpStr = 'top:180px; font-size: 1.8em;';
|
|
45491
45529
|
html += me.htmlCls.divStr + "wait' style='position:absolute; left:50px; " + tmpStr + " color: #444444;'>Loading data...</div>";
|
|
45492
45530
|
}
|
|
45493
|
-
html += "<canvas id='" + me.pre + "canvas' style='width:100%; height: 100%; background-color: #
|
|
45531
|
+
html += "<canvas id='" + me.pre + "canvas' style='width:100%; height: 100%; background-color: #FFF;'>Your browser does not support WebGL.</canvas>";
|
|
45494
45532
|
|
|
45495
45533
|
// separate for the log box
|
|
45496
45534
|
if(me.cfg.showcommand === undefined || me.cfg.showcommand) {
|
|
@@ -45526,6 +45564,8 @@ class SetMenu {
|
|
|
45526
45564
|
setTopMenusHtmlMobile(id, str1, str2) { let me = this.icn3dui;
|
|
45527
45565
|
if(me.bNode) return '';
|
|
45528
45566
|
|
|
45567
|
+
let titleColor =(me.htmlCls.opts['background'] == 'black') ? me.htmlCls.GREYD : 'black';
|
|
45568
|
+
|
|
45529
45569
|
let html = "";
|
|
45530
45570
|
|
|
45531
45571
|
html += "<div style='position:relative;'>";
|
|
@@ -45595,8 +45635,6 @@ class SetMenu {
|
|
|
45595
45635
|
//html += me.htmlCls.setMenuCls.setTools();
|
|
45596
45636
|
|
|
45597
45637
|
// show title at the top left corner
|
|
45598
|
-
let titleColor =(me.htmlCls.opts['background'] == 'white' || me.htmlCls.opts['background'] == 'grey') ? 'black' : me.htmlCls.GREYD;
|
|
45599
|
-
|
|
45600
45638
|
html += me.htmlCls.divStr + "title' class='icn3d-commandTitle' style='font-size:1.2em; font-weight:normal; position:absolute; z-index:1; float:left; display:block; margin: 12px 0px 0px 40px; color:" + titleColor + "; width:" +(me.htmlCls.WIDTH - 40).toString() + "px'></div>";
|
|
45601
45639
|
html += me.htmlCls.divStr + "viewer' style='position:relative; width:100%; height:100%; background-color: " + me.htmlCls.GREYD + ";'>";
|
|
45602
45640
|
html += me.htmlCls.divStr + "mnLogSection'>";
|
|
@@ -45608,7 +45646,7 @@ class SetMenu {
|
|
|
45608
45646
|
let tmpStr = 'top:180px; font-size: 1.8em;';
|
|
45609
45647
|
html += me.htmlCls.divStr + "wait' style='position:absolute; left:50px; " + tmpStr + " color: #444444;'>Loading data...</div>";
|
|
45610
45648
|
}
|
|
45611
|
-
html += "<canvas id='" + me.pre + "canvas' style='width:100%; height: 100%; background-color: #
|
|
45649
|
+
html += "<canvas id='" + me.pre + "canvas' style='width:100%; height: 100%; background-color: #FFF;'>Your browser does not support WebGL.</canvas>";
|
|
45612
45650
|
|
|
45613
45651
|
// separate for the log box
|
|
45614
45652
|
if(me.cfg.showcommand === undefined || me.cfg.showcommand) {
|
|
@@ -46392,8 +46430,8 @@ class SetMenu {
|
|
|
46392
46430
|
|
|
46393
46431
|
html += "<li><span>Background</span>";
|
|
46394
46432
|
html += "<ul>";
|
|
46395
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn6_bkgd', 'mn6_bkgdTransparent', 'Transparent'
|
|
46396
|
-
html += me.htmlCls.setHtmlCls.getRadio('mn6_bkgd', 'mn6_bkgdBlack', 'Black');
|
|
46433
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_bkgd', 'mn6_bkgdTransparent', 'Transparent');
|
|
46434
|
+
html += me.htmlCls.setHtmlCls.getRadio('mn6_bkgd', 'mn6_bkgdBlack', 'Black', true);
|
|
46397
46435
|
html += me.htmlCls.setHtmlCls.getRadio('mn6_bkgd', 'mn6_bkgdGrey', 'Gray');
|
|
46398
46436
|
html += me.htmlCls.setHtmlCls.getRadio('mn6_bkgd', 'mn6_bkgdWhite', 'White');
|
|
46399
46437
|
html += "</ul>";
|
|
@@ -48285,23 +48323,23 @@ class SetDialog {
|
|
|
48285
48323
|
html += me.htmlCls.divStr + "dl_addlabel' class='" + dialogClass + "'>";
|
|
48286
48324
|
html += "1. Text: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labeltext' value='Text' size=4><br/>";
|
|
48287
48325
|
html += "2. Size: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelsize' value='18' size=4 maxlength=2><br/>";
|
|
48288
|
-
html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor' value='" + defaultColor + "' size=4><br/>";
|
|
48289
|
-
html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd' value='' size=4><br/>";
|
|
48326
|
+
//html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor' value='" + defaultColor + "' size=4><br/>";
|
|
48327
|
+
//html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd' value='' size=4><br/>";
|
|
48290
48328
|
if(me.utilsCls.isMobile()) {
|
|
48291
|
-
html += me.htmlCls.spanNowrapStr + "
|
|
48329
|
+
html += me.htmlCls.spanNowrapStr + "3. Touch TWO atoms</span><br/>";
|
|
48292
48330
|
}
|
|
48293
48331
|
else {
|
|
48294
|
-
html += me.htmlCls.spanNowrapStr + "
|
|
48332
|
+
html += me.htmlCls.spanNowrapStr + "3. Pick TWO atoms while holding \"Alt\" key</span><br/>";
|
|
48295
48333
|
}
|
|
48296
|
-
html += me.htmlCls.spanNowrapStr + "
|
|
48334
|
+
html += me.htmlCls.spanNowrapStr + "4. " + me.htmlCls.buttonStr + "applypick_labels'>Display</button></span>";
|
|
48297
48335
|
html += "</div>";
|
|
48298
48336
|
|
|
48299
48337
|
html += me.htmlCls.divStr + "dl_addlabelselection' class='" + dialogClass + "'>";
|
|
48300
48338
|
html += "1. Text: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labeltext2' value='Text' size=4><br/>";
|
|
48301
48339
|
html += "2. Size: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelsize2' value='18' size=4 maxlength=2><br/>";
|
|
48302
|
-
html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor2' value='" + defaultColor + "' size=4><br/>";
|
|
48303
|
-
html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd2' value='' size=4><br/>";
|
|
48304
|
-
html += me.htmlCls.spanNowrapStr + "
|
|
48340
|
+
//html += "3. Color: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelcolor2' value='" + defaultColor + "' size=4><br/>";
|
|
48341
|
+
//html += "4. Background: " + me.htmlCls.inputTextStr + "id='" + me.pre + "labelbkgd2' value='' size=4><br/>";
|
|
48342
|
+
html += me.htmlCls.spanNowrapStr + "3. " + me.htmlCls.buttonStr + "applyselection_labels'>Display</button></span>";
|
|
48305
48343
|
html += "</div>";
|
|
48306
48344
|
|
|
48307
48345
|
html += me.htmlCls.divStr + "dl_distance' class='" + dialogClass + "'>";
|
|
@@ -51617,7 +51655,7 @@ class Html {
|
|
|
51617
51655
|
this.cfg = this.icn3dui.cfg;
|
|
51618
51656
|
|
|
51619
51657
|
this.opts = {};
|
|
51620
|
-
this.opts['background'] = '
|
|
51658
|
+
this.opts['background'] = 'black'; //transparent, black, grey, white
|
|
51621
51659
|
|
|
51622
51660
|
this.WIDTH = 400; // total width of view area
|
|
51623
51661
|
this.HEIGHT = 400; // total height of view area
|
|
@@ -54518,7 +54556,7 @@ class iCn3D {
|
|
|
54518
54556
|
//The default display options
|
|
54519
54557
|
this.optsOri = {};
|
|
54520
54558
|
this.optsOri['camera'] = 'perspective'; //perspective, orthographic
|
|
54521
|
-
this.optsOri['background'] = '
|
|
54559
|
+
this.optsOri['background'] = 'black'; //transparent, black, grey, white
|
|
54522
54560
|
this.optsOri['color'] = 'chain'; //spectrum, secondary structure, charge, hydrophobic, conserved, chain, residue, atom, b factor, red, green, blue, magenta, yellow, cyan, white, grey, custom
|
|
54523
54561
|
this.optsOri['proteins'] = 'ribbon'; //ribbon, strand, cylinder and plate, schematic, c alpha trace, backbone, b factor tube, lines, stick, ball and stick, sphere, nothing
|
|
54524
54562
|
this.optsOri['sidec'] = 'nothing'; //lines, stick, ball and stick, sphere, nothing
|
|
@@ -54916,7 +54954,7 @@ class iCn3DUI {
|
|
|
54916
54954
|
//even when multiple iCn3D viewers are shown together.
|
|
54917
54955
|
this.pre = this.cfg.divid + "_";
|
|
54918
54956
|
|
|
54919
|
-
this.REVISION = '3.
|
|
54957
|
+
this.REVISION = '3.6.0';
|
|
54920
54958
|
|
|
54921
54959
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
54922
54960
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|