icn3d 3.24.6 → 3.25.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 +140 -51
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +140 -51
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -2295,7 +2295,7 @@ THREE.TrackballControls = function ( object, domElement, icn3d ) {
|
|
|
2295
2295
|
this.screen.width = window.innerWidth;
|
|
2296
2296
|
this.screen.height = window.innerHeight;
|
|
2297
2297
|
|
|
2298
|
-
} else {
|
|
2298
|
+
} else if(this.domElement) {
|
|
2299
2299
|
|
|
2300
2300
|
var box = this.domElement.getBoundingClientRect();
|
|
2301
2301
|
// adjustments come from similar code in the jquery offset() function
|
|
@@ -2865,7 +2865,7 @@ THREE.TrackballControls = function ( object, domElement, icn3d ) {
|
|
|
2865
2865
|
|
|
2866
2866
|
}
|
|
2867
2867
|
|
|
2868
|
-
if(Object.keys(window).length >= 2) {
|
|
2868
|
+
if(Object.keys(window).length >= 2 && this.domElement) {
|
|
2869
2869
|
this.domElement.addEventListener( 'contextmn', function ( event ) {
|
|
2870
2870
|
//event.preventDefault();
|
|
2871
2871
|
}, false );
|
|
@@ -2991,7 +2991,7 @@ THREE.OrthographicTrackballControls = function ( object, domElement, icn3d ) { v
|
|
|
2991
2991
|
this.screen.width = window.innerWidth;
|
|
2992
2992
|
this.screen.height = window.innerHeight;
|
|
2993
2993
|
|
|
2994
|
-
} else {
|
|
2994
|
+
} else if(this.domElement) {
|
|
2995
2995
|
|
|
2996
2996
|
var box = this.domElement.getBoundingClientRect();
|
|
2997
2997
|
// adjustments come from similar code in the jquery offset() function
|
|
@@ -3541,7 +3541,7 @@ THREE.OrthographicTrackballControls = function ( object, domElement, icn3d ) { v
|
|
|
3541
3541
|
|
|
3542
3542
|
}
|
|
3543
3543
|
|
|
3544
|
-
if(Object.keys(window).length >= 2) {
|
|
3544
|
+
if(Object.keys(window).length >= 2 && this.domElement) {
|
|
3545
3545
|
this.domElement.addEventListener( 'contextmn', function ( event ) {
|
|
3546
3546
|
//event.preventDefault();
|
|
3547
3547
|
}, false );
|
|
@@ -10297,8 +10297,8 @@ class SetMenu {
|
|
|
10297
10297
|
//}
|
|
10298
10298
|
|
|
10299
10299
|
//!!!
|
|
10300
|
-
//html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
10301
|
-
//html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
10300
|
+
// html += this.getRadio('mn4_clr', 'mn4_clrIgstrand', 'Ig Strand', undefined, undefined, 2);
|
|
10301
|
+
// html += this.getRadio('mn4_clr', 'mn4_clrIgproto', 'Ig Protodomain', undefined, undefined, 2);
|
|
10302
10302
|
}
|
|
10303
10303
|
else {
|
|
10304
10304
|
//if(!me.cfg.hidelicense) html += this.getRadio('mn4_clr', 'mn1_delphi2', 'DelPhi<br><span style="padding-left:1.5em;">Potential ' + me.htmlCls.licenseStr + '</span>');
|
|
@@ -39448,7 +39448,7 @@ class Domain3d {
|
|
|
39448
39448
|
|
|
39449
39449
|
//substruct: array of secondary structures, each of which has the keys: From (1-based), To (1-based), Sheet (0 or 1), also add these paras: x1, y1, z1, x2, y2, z2
|
|
39450
39450
|
let substruct = [];
|
|
39451
|
-
// determine residue ranges for each subdomain
|
|
39451
|
+
// determine residue position ranges for each subdomain
|
|
39452
39452
|
let subdomains = [];
|
|
39453
39453
|
|
|
39454
39454
|
// sheets: array of sheets, each of which has the key: sheet_num (beta sandwich has two sheets, e.g., 0 and 1), adj_strand1 (not used), adj_strand2
|
|
@@ -51057,10 +51057,15 @@ class RealignParser {
|
|
|
51057
51057
|
//let chainTo = chainidArray[0];
|
|
51058
51058
|
//let chainFrom = chainidArray[index + 1];
|
|
51059
51059
|
|
|
51060
|
-
let bChainAlign = true;
|
|
51060
|
+
let bChainAlign = true, result;
|
|
51061
51061
|
|
|
51062
|
-
|
|
51063
|
-
|
|
51062
|
+
if(ic.bAfMem) { // align to the query (membrane)
|
|
51063
|
+
result = ic.ParserUtilsCls.alignCoords(coordsFrom, coordsTo, toStruct, undefined, chainTo, chainFrom, index + 1, bChainAlign);
|
|
51064
|
+
}
|
|
51065
|
+
else {
|
|
51066
|
+
result = ic.ParserUtilsCls.alignCoords(coordsFrom, coordsTo, fromStruct, undefined, chainTo, chainFrom, index + 1, bChainAlign);
|
|
51067
|
+
}
|
|
51068
|
+
|
|
51064
51069
|
hAtoms = me.hashUtilsCls.unionHash(hAtoms, result.hAtoms);
|
|
51065
51070
|
|
|
51066
51071
|
// ic.opts['color'] = 'identity';
|
|
@@ -51148,13 +51153,13 @@ class RealignParser {
|
|
|
51148
51153
|
}
|
|
51149
51154
|
|
|
51150
51155
|
// use the model from Membranome as template
|
|
51151
|
-
if(ic.bAfMem && chainidArray.length == 2) {
|
|
51152
|
-
|
|
51153
|
-
|
|
51154
|
-
|
|
51155
|
-
|
|
51156
|
-
|
|
51157
|
-
}
|
|
51156
|
+
// if(ic.bAfMem && chainidArray.length == 2) {
|
|
51157
|
+
// if(chainidArray[1].split('_')[0] == pdbidTemplate) {
|
|
51158
|
+
// let tmp = chainidArray[0];
|
|
51159
|
+
// chainidArray[0] = chainidArray[1];
|
|
51160
|
+
// chainidArray[1] = tmp;
|
|
51161
|
+
// }
|
|
51162
|
+
// }
|
|
51158
51163
|
|
|
51159
51164
|
let bRealign = true;
|
|
51160
51165
|
ic.qt_start_end = []; // reset the alignment
|
|
@@ -52633,7 +52638,12 @@ class ParserUtils {
|
|
|
52633
52638
|
|
|
52634
52639
|
if(n < 4) alert("Please select at least four residues in each structure...");
|
|
52635
52640
|
if(n >= 4) {
|
|
52636
|
-
ic.
|
|
52641
|
+
if(ic.bAfMem) { // align to the query (membrane)
|
|
52642
|
+
ic.rmsd_suprTmp = me.rmsdSuprCls.getRmsdSuprCls(coordsTo, coordsFrom, n);
|
|
52643
|
+
}
|
|
52644
|
+
else {
|
|
52645
|
+
ic.rmsd_suprTmp = me.rmsdSuprCls.getRmsdSuprCls(coordsFrom, coordsTo, n);
|
|
52646
|
+
}
|
|
52637
52647
|
|
|
52638
52648
|
// apply matrix for each atom
|
|
52639
52649
|
if(ic.rmsd_suprTmp.rot !== undefined) {
|
|
@@ -53272,7 +53282,7 @@ class ParserUtils {
|
|
|
53272
53282
|
await ic.showAnnoCls.showAnnotations();
|
|
53273
53283
|
}
|
|
53274
53284
|
|
|
53275
|
-
if(me.cfg.closepopup) {
|
|
53285
|
+
if(me.cfg.closepopup || me.cfg.imageonly) {
|
|
53276
53286
|
ic.resizeCanvasCls.closeDialogs();
|
|
53277
53287
|
}
|
|
53278
53288
|
}
|
|
@@ -53281,6 +53291,8 @@ class ParserUtils {
|
|
|
53281
53291
|
}
|
|
53282
53292
|
if($("#" + ic.pre + "atomsCustom").length > 0) $("#" + ic.pre + "atomsCustom")[0].blur();
|
|
53283
53293
|
ic.bInitial = false;
|
|
53294
|
+
|
|
53295
|
+
if(me.cfg.imageonly) ic.saveFileCls.saveFile(undefined, 'png', undefined, true);
|
|
53284
53296
|
}, 0);
|
|
53285
53297
|
}
|
|
53286
53298
|
|
|
@@ -60010,9 +60022,10 @@ class LoadScript {
|
|
|
60010
60022
|
|
|
60011
60023
|
// load pdb, mmcif, mmdb, cid
|
|
60012
60024
|
let id = loadStr.substr(loadStr.lastIndexOf(' ') + 1);
|
|
60025
|
+
if(id.length == 4) id = id.toUpperCase();
|
|
60013
60026
|
|
|
60014
60027
|
// skip loading the structure if it was loaded before
|
|
60015
|
-
if(ic.structures.hasOwnProperty(id)) return;
|
|
60028
|
+
if(ic.structures && ic.structures.hasOwnProperty(id)) return;
|
|
60016
60029
|
|
|
60017
60030
|
ic.inputid = id;
|
|
60018
60031
|
if(command.indexOf('load mmtf') !== -1) {
|
|
@@ -60363,7 +60376,7 @@ class LoadScript {
|
|
|
60363
60376
|
ic.drawCls.draw();
|
|
60364
60377
|
}
|
|
60365
60378
|
|
|
60366
|
-
if(me.cfg.closepopup) {
|
|
60379
|
+
if(me.cfg.closepopup || me.cfg.imageonly) {
|
|
60367
60380
|
setTimeout(function(){
|
|
60368
60381
|
ic.resizeCanvasCls.closeDialogs();
|
|
60369
60382
|
}, 100);
|
|
@@ -60374,6 +60387,8 @@ class LoadScript {
|
|
|
60374
60387
|
// an extra render to remove artifacts in transparent surface
|
|
60375
60388
|
if(ic.bTransparentSurface && ic.bRender) ic.drawCls.render();
|
|
60376
60389
|
|
|
60390
|
+
if(me.cfg.imageonly) ic.saveFileCls.saveFile(undefined, 'png', undefined, true);
|
|
60391
|
+
|
|
60377
60392
|
/// if(ic.deferred !== undefined) ic.deferred.resolve(); /// if(ic.deferred2 !== undefined) ic.deferred2.resolve();
|
|
60378
60393
|
/// if(ic.deferredMmdbaf !== undefined) ic.deferredMmdbaf.resolve();
|
|
60379
60394
|
}
|
|
@@ -61268,7 +61283,7 @@ class Selection {
|
|
|
61268
61283
|
|
|
61269
61284
|
ic.reinitAfterLoad();
|
|
61270
61285
|
|
|
61271
|
-
ic.loadScriptCls.renderFinalStep(1);
|
|
61286
|
+
//ic.loadScriptCls.renderFinalStep(1);
|
|
61272
61287
|
ic.definedSetsCls.setMode('all');
|
|
61273
61288
|
|
|
61274
61289
|
ic.selectionCls.selectAll();
|
|
@@ -61279,6 +61294,8 @@ class Selection {
|
|
|
61279
61294
|
ic.hlUpdateCls.removeSeqResidueBkgd();
|
|
61280
61295
|
ic.hlUpdateCls.removeHl2D();
|
|
61281
61296
|
ic.hlUpdateCls.removeHlMenus();
|
|
61297
|
+
|
|
61298
|
+
ic.loadScriptCls.renderFinalStep(1);
|
|
61282
61299
|
}
|
|
61283
61300
|
|
|
61284
61301
|
async loadSelection(dataStr) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -62843,14 +62860,17 @@ class Dssp {
|
|
|
62843
62860
|
async showIgRefNum() { let ic = this.icn3d, me = ic.icn3dui;
|
|
62844
62861
|
let thisClass = this;
|
|
62845
62862
|
|
|
62846
|
-
if(ic.resid2refnum && Object.keys(ic.resid2refnum).length > 0) {
|
|
62847
|
-
|
|
62863
|
+
// if(ic.resid2refnum && Object.keys(ic.resid2refnum).length > 0) {
|
|
62864
|
+
// ic.bShowRefnum = true;
|
|
62848
62865
|
|
|
62849
|
-
|
|
62850
|
-
|
|
62851
|
-
|
|
62852
|
-
|
|
62853
|
-
|
|
62866
|
+
// // open sequence view
|
|
62867
|
+
// ic.hAtomsRefnum = {};
|
|
62868
|
+
// ic.bResetAnno = true;
|
|
62869
|
+
// await ic.showAnnoCls.showAnnotations();
|
|
62870
|
+
// ic.annotationCls.setAnnoViewAndDisplay('detailed view');
|
|
62871
|
+
// }
|
|
62872
|
+
if(ic.pdbDataArray) {
|
|
62873
|
+
await thisClass.parseRefPdbData(ic.pdbDataArray);
|
|
62854
62874
|
}
|
|
62855
62875
|
else {
|
|
62856
62876
|
//ic.refpdbArray = ['1bqu_fn3', '1cd8_igv', '1t6v_vnar', '1wio_c2', '1wio_igv', '2atp_a', '2atp_b', '2dm3_iset', '5esv_vh', '5esv_vl', '6al5_cd19', '7bz5_cl1', '7bz5_vh', '7bz5_vl'];
|
|
@@ -62913,6 +62933,7 @@ class Dssp {
|
|
|
62913
62933
|
|
|
62914
62934
|
let urltmalign = me.htmlCls.baseUrl + "tmalign/tmalign.cgi";
|
|
62915
62935
|
|
|
62936
|
+
// if(!ic.resid2domainid) ic.resid2domainid = {};
|
|
62916
62937
|
ic.resid2domainid = {};
|
|
62917
62938
|
|
|
62918
62939
|
for(let i = 0, il = struArray.length; i < il; ++i) {
|
|
@@ -62926,20 +62947,33 @@ class Dssp {
|
|
|
62926
62947
|
&& !ic.proteins.hasOwnProperty(ic.firstAtomObjCls.getMiddleAtomObj(ic.chains[chainid]).serial)) continue;
|
|
62927
62948
|
if(ic.chainsSeq[chainid].length < 50) continue; // peptide
|
|
62928
62949
|
|
|
62950
|
+
let currAtoms = me.hashUtilsCls.intHash(ic.chains[chainid], ic.hAtoms);
|
|
62951
|
+
if(Object.keys(currAtoms).length == 0) continue;
|
|
62952
|
+
|
|
62929
62953
|
// align each 3D domain with reference structure
|
|
62930
|
-
let result = ic.domain3dCls.c2b_NewSplitChain(ic.chains[chainid]);
|
|
62954
|
+
//let result = ic.domain3dCls.c2b_NewSplitChain(ic.chains[chainid]);
|
|
62955
|
+
// assign ref numbers to selected residues
|
|
62956
|
+
let result = ic.domain3dCls.c2b_NewSplitChain(currAtoms);
|
|
62931
62957
|
let subdomains = result.subdomains;
|
|
62958
|
+
let pos2resi = result.pos2resi;
|
|
62932
62959
|
|
|
62933
62960
|
let domainAtomsArray = [];
|
|
62934
62961
|
if(subdomains.length <= 1) {
|
|
62935
|
-
domainAtomsArray.push(ic.chains[chainid]);
|
|
62962
|
+
//domainAtomsArray.push(ic.chains[chainid]);
|
|
62963
|
+
domainAtomsArray.push(currAtoms);
|
|
62936
62964
|
|
|
62937
|
-
for(let n = 0, nl = ic.chainsSeq[chainid].length; n < nl; ++n) {
|
|
62938
|
-
|
|
62965
|
+
// for(let n = 0, nl = ic.chainsSeq[chainid].length; n < nl; ++n) {
|
|
62966
|
+
// let resid = chainid + '_' + ic.chainsSeq[chainid][n].resi;
|
|
62967
|
+
// ic.resid2domainid[resid] = chainid + '-0';
|
|
62968
|
+
// }
|
|
62969
|
+
|
|
62970
|
+
let residueArray = ic.resid2specCls.atoms2residues(Object.keys(currAtoms));
|
|
62971
|
+
for(let n = 0, nl = residueArray.length; n < nl; ++n) {
|
|
62972
|
+
let resid = residueArray[n];
|
|
62939
62973
|
ic.resid2domainid[resid] = chainid + '-0';
|
|
62940
|
-
}
|
|
62974
|
+
}
|
|
62941
62975
|
}
|
|
62942
|
-
else {
|
|
62976
|
+
else {
|
|
62943
62977
|
for(let k = 0, kl = subdomains.length; k < kl; ++k) {
|
|
62944
62978
|
let domainAtoms = {};
|
|
62945
62979
|
let segArray = subdomains[k];
|
|
@@ -62948,8 +62982,9 @@ class Dssp {
|
|
|
62948
62982
|
let startResi = segArray[m];
|
|
62949
62983
|
let endResi = segArray[m+1];
|
|
62950
62984
|
for(let n = parseInt(startResi); n <= parseInt(endResi); ++n) {
|
|
62951
|
-
let residNCBI = chainid + '_' + n;
|
|
62952
|
-
let resid = ic.ncbi2resid[residNCBI];
|
|
62985
|
+
//let residNCBI = chainid + '_' + n;
|
|
62986
|
+
//let resid = ic.ncbi2resid[residNCBI];
|
|
62987
|
+
let resid = chainid + '_' + pos2resi[n];
|
|
62953
62988
|
domainAtoms = me.hashUtilsCls.unionHash(domainAtoms, ic.residues[resid]);
|
|
62954
62989
|
ic.resid2domainid[resid] = chainid + '-' + k;
|
|
62955
62990
|
}
|
|
@@ -63015,6 +63050,12 @@ class Dssp {
|
|
|
63015
63050
|
|
|
63016
63051
|
// find the best alignment for each chain
|
|
63017
63052
|
let domainid2score = {}, domainid2segs = {}, chainid2segs = {};
|
|
63053
|
+
|
|
63054
|
+
// if(!ic.chainid2index) ic.chainid2index = {};
|
|
63055
|
+
// if(!ic.domainid2index) ic.domainid2index = {};
|
|
63056
|
+
// if(!ic.domainid2ig2kabat) ic.domainid2ig2kabat = {};
|
|
63057
|
+
// if(!ic.domainid2ig2imgt) ic.domainid2ig2imgt = {};
|
|
63058
|
+
|
|
63018
63059
|
ic.chainid2index = {};
|
|
63019
63060
|
ic.domainid2index = {};
|
|
63020
63061
|
ic.domainid2ig2kabat = {};
|
|
@@ -67124,7 +67165,9 @@ class SaveFile {
|
|
|
67124
67165
|
//The type "png" is used to save the current canvas image. The type "html" is used to save html file with the
|
|
67125
67166
|
//"data". This can be used to save any text. The type "text" is used to save an array of text, where "data" is
|
|
67126
67167
|
//actually an array. The type "binary" is used to save an array of binary, where "data" is actually an array.
|
|
67127
|
-
saveFile(filename, type, text) { let ic = this.icn3d, me = ic.icn3dui;
|
|
67168
|
+
saveFile(filename, type, text, bBlob) { let ic = this.icn3d, me = ic.icn3dui;
|
|
67169
|
+
let thisClass = this;
|
|
67170
|
+
|
|
67128
67171
|
//Save file
|
|
67129
67172
|
let blob;
|
|
67130
67173
|
|
|
@@ -67165,7 +67208,7 @@ class SaveFile {
|
|
|
67165
67208
|
if(me.utilsCls.isIE()) {
|
|
67166
67209
|
blob = ic.renderer.domElement.msToBlob();
|
|
67167
67210
|
|
|
67168
|
-
if(bAddURL) {
|
|
67211
|
+
if(bAddURL && typeof(blob) == 'Blob') {
|
|
67169
67212
|
let reader = new FileReader();
|
|
67170
67213
|
reader.onload = function(e) {
|
|
67171
67214
|
let arrayBuffer = e.target.result; // or = reader.result;
|
|
@@ -67175,23 +67218,23 @@ class SaveFile {
|
|
|
67175
67218
|
blob = me.convertTypeCls.getBlobFromBufferAndText(arrayBuffer, text);
|
|
67176
67219
|
|
|
67177
67220
|
//if(window.navigator.msSaveBlob) navigator.msSaveBlob(blob, filename);
|
|
67178
|
-
|
|
67221
|
+
thisClass.saveBlob(blob, filename, bBlob, width, height);
|
|
67179
67222
|
|
|
67180
|
-
return;
|
|
67223
|
+
return blob;
|
|
67181
67224
|
};
|
|
67182
67225
|
|
|
67183
67226
|
reader.readAsArrayBuffer(blob);
|
|
67184
67227
|
}
|
|
67185
67228
|
else {
|
|
67186
67229
|
//ic.createLinkForBlob(blob, filename);
|
|
67187
|
-
|
|
67230
|
+
thisClass.saveBlob(blob, filename, bBlob, width, height);
|
|
67188
67231
|
|
|
67189
|
-
return;
|
|
67232
|
+
return blob;
|
|
67190
67233
|
}
|
|
67191
67234
|
}
|
|
67192
67235
|
else {
|
|
67193
67236
|
ic.renderer.domElement.toBlob(function(data) {
|
|
67194
|
-
if(bAddURL) {
|
|
67237
|
+
if(bAddURL && typeof(blob) == 'data') {
|
|
67195
67238
|
let reader = new FileReader();
|
|
67196
67239
|
reader.onload = function(e) {
|
|
67197
67240
|
let arrayBuffer = e.target.result; // or = reader.result;
|
|
@@ -67201,9 +67244,9 @@ class SaveFile {
|
|
|
67201
67244
|
blob = me.convertTypeCls.getBlobFromBufferAndText(arrayBuffer, text);
|
|
67202
67245
|
|
|
67203
67246
|
//ic.createLinkForBlob(blob, filename);
|
|
67204
|
-
|
|
67247
|
+
thisClass.saveBlob(blob, filename, bBlob, width, height);
|
|
67205
67248
|
|
|
67206
|
-
return;
|
|
67249
|
+
return blob;
|
|
67207
67250
|
};
|
|
67208
67251
|
|
|
67209
67252
|
reader.readAsArrayBuffer(data);
|
|
@@ -67212,9 +67255,9 @@ class SaveFile {
|
|
|
67212
67255
|
blob = data;
|
|
67213
67256
|
|
|
67214
67257
|
//ic.createLinkForBlob(blob, filename);
|
|
67215
|
-
|
|
67258
|
+
thisClass.saveBlob(blob, filename, bBlob, width, height);
|
|
67216
67259
|
|
|
67217
|
-
return;
|
|
67260
|
+
return blob;
|
|
67218
67261
|
}
|
|
67219
67262
|
});
|
|
67220
67263
|
}
|
|
@@ -67252,6 +67295,44 @@ class SaveFile {
|
|
|
67252
67295
|
//https://github.com/eligrey/FileSaver.js/
|
|
67253
67296
|
saveAs(blob, filename);
|
|
67254
67297
|
}
|
|
67298
|
+
|
|
67299
|
+
return blob;
|
|
67300
|
+
}
|
|
67301
|
+
|
|
67302
|
+
saveBlob(blob, filename, bBlob, width, height) { let ic = this.icn3d; ic.icn3dui;
|
|
67303
|
+
if(bBlob) {
|
|
67304
|
+
let urlCreator = window.URL || window.webkitURL;
|
|
67305
|
+
let imageUrl = urlCreator.createObjectURL(blob);
|
|
67306
|
+
|
|
67307
|
+
let url = ic.shareLinkCls.shareLinkUrl();
|
|
67308
|
+
|
|
67309
|
+
url = url.replace(/imageonly=1/g, '');
|
|
67310
|
+
|
|
67311
|
+
let bTooLong =(url.length > 4000 || url.indexOf('http') !== 0) ? true : false;
|
|
67312
|
+
|
|
67313
|
+
if(bTooLong || (ic.bInputfile && !ic.bInputUrlfile)) {
|
|
67314
|
+
// $("#" + ic.pre + "viewer").html("<img src='" + imageUrl + "'/>");
|
|
67315
|
+
$("#" + ic.pre + "mnlist").html("<img src='" + imageUrl + "'/>");
|
|
67316
|
+
}
|
|
67317
|
+
else {
|
|
67318
|
+
// $("#" + ic.pre + "viewer").html("<a href='" + url + "' target='_blank'><img src='" + imageUrl + "'/></a>");
|
|
67319
|
+
$("#" + ic.pre + "mnlist").html("<a href='" + url + "' target='_blank'><img src='" + imageUrl + "'/></a>");
|
|
67320
|
+
}
|
|
67321
|
+
|
|
67322
|
+
$("#" + ic.pre + "viewer").height(height);
|
|
67323
|
+
$("#" + ic.pre + "cmdlog").hide();
|
|
67324
|
+
$("#" + ic.pre + "title").hide();
|
|
67325
|
+
//$("#" + ic.pre + "mnlist").hide();
|
|
67326
|
+
$("#" + ic.pre + "canvas").hide(); // "load mmdbid ..." may cause problems if canvas was removed
|
|
67327
|
+
|
|
67328
|
+
if($("#" + ic.pre + "fullscreen").length > 0) $("#" + ic.pre + "fullscreen").hide();
|
|
67329
|
+
|
|
67330
|
+
// clear memory
|
|
67331
|
+
ic = {};
|
|
67332
|
+
}
|
|
67333
|
+
else {
|
|
67334
|
+
saveAs(blob, filename);
|
|
67335
|
+
}
|
|
67255
67336
|
}
|
|
67256
67337
|
|
|
67257
67338
|
saveSvg(id, filename, bContactmap) { let ic = this.icn3d, me = ic.icn3dui;
|
|
@@ -67876,7 +67957,9 @@ class SaveFile {
|
|
|
67876
67957
|
$("#" + ic.pre + "title").html(title);
|
|
67877
67958
|
}
|
|
67878
67959
|
else if(structureArray.length == 1) {
|
|
67879
|
-
let url = this.getLinkToStructureSummary();
|
|
67960
|
+
//let url = this.getLinkToStructureSummary();
|
|
67961
|
+
let url = (isNaN(ic.inputid) && ic.inputid.length > 5) ? 'https://alphafold.ebi.ac.uk/entry/' + ic.inputid : 'https://www.ncbi.nlm.nih.gov/structure/?term=' + ic.inputid;
|
|
67962
|
+
|
|
67880
67963
|
this.setStructureTitle(url, title, titlelinkColor);
|
|
67881
67964
|
}
|
|
67882
67965
|
}
|
|
@@ -68191,6 +68274,10 @@ class ShareLink {
|
|
|
68191
68274
|
if(key_value.length == 2) paraHash[key_value[0]] = key_value[1];
|
|
68192
68275
|
}
|
|
68193
68276
|
|
|
68277
|
+
if(me.cfg.notebook && me.cfg.idname && !paraHash[me.cfg.idname]) { // somehow it is not included
|
|
68278
|
+
url += me.cfg.idname + '=' + me.cfg.idvalue + '&';
|
|
68279
|
+
}
|
|
68280
|
+
|
|
68194
68281
|
for(let key in paraHash) {
|
|
68195
68282
|
if(key === 'v') continue;
|
|
68196
68283
|
|
|
@@ -68230,7 +68317,7 @@ class ShareLink {
|
|
|
68230
68317
|
transformation.quaternion = ic.quaternion;
|
|
68231
68318
|
|
|
68232
68319
|
let statefile = "";
|
|
68233
|
-
let prevCommandStr =
|
|
68320
|
+
let prevCommandStr = "";
|
|
68234
68321
|
|
|
68235
68322
|
let toggleStr = 'toggle highlight';
|
|
68236
68323
|
let cntToggle = 0;
|
|
@@ -68304,6 +68391,7 @@ class ShareLink {
|
|
|
68304
68391
|
if(ic.structures !== undefined && Object.keys(ic.structures).length == 1 && ic.inputid !== undefined) {
|
|
68305
68392
|
id = Object.keys(ic.structures)[0];
|
|
68306
68393
|
url = url.replace(new RegExp(id + '_','g'), '!');
|
|
68394
|
+
outputCmd = outputCmd.replace(new RegExp(id + '_','g'), '!');
|
|
68307
68395
|
}
|
|
68308
68396
|
|
|
68309
68397
|
if(me.cfg.blast_rep_id !== undefined) {
|
|
@@ -71169,7 +71257,7 @@ class iCn3DUI {
|
|
|
71169
71257
|
//even when multiple iCn3D viewers are shown together.
|
|
71170
71258
|
this.pre = this.cfg.divid + "_";
|
|
71171
71259
|
|
|
71172
|
-
this.REVISION = '3.
|
|
71260
|
+
this.REVISION = '3.25.0';
|
|
71173
71261
|
|
|
71174
71262
|
// In nodejs, iCn3D defines "window = {navigator: {}}"
|
|
71175
71263
|
this.bNode = (Object.keys(window).length < 2) ? true : false;
|
|
@@ -71183,6 +71271,7 @@ class iCn3DUI {
|
|
|
71183
71271
|
if(this.cfg.showcommand === undefined) this.cfg.showcommand = true;
|
|
71184
71272
|
//if(this.cfg.simplemenu === undefined) this.cfg.simplemenu = false;
|
|
71185
71273
|
if(this.cfg.mobilemenu === undefined) this.cfg.mobilemenu = false;
|
|
71274
|
+
if(this.cfg.imageonly === undefined) this.cfg.imageonly = false;
|
|
71186
71275
|
if(this.cfg.closepopup === undefined) this.cfg.closepopup = false;
|
|
71187
71276
|
if(this.cfg.showanno === undefined) this.cfg.showanno = false;
|
|
71188
71277
|
if(this.cfg.showseq === undefined) this.cfg.showseq = false;
|