icn3d 3.45.5 → 3.45.7
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/LICENSE +0 -0
- package/README.md +0 -0
- package/icn3d.js +44 -32
- package/icn3d.min.js +3 -3
- package/icn3d.module.js +44 -32
- package/package.json +1 -1
package/icn3d.module.js
CHANGED
|
@@ -59316,11 +59316,13 @@ class ClickMenu {
|
|
|
59316
59316
|
});
|
|
59317
59317
|
|
|
59318
59318
|
me.myEventCls.onIds("#" + me.pre + "mn6_cameraPers", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
59319
|
+
ic.bChangeCamera = true;
|
|
59319
59320
|
ic.setOptionCls.setOption('camera', 'perspective');
|
|
59320
59321
|
thisClass.setLogCmd('set camera perspective', true);
|
|
59321
59322
|
});
|
|
59322
59323
|
|
|
59323
59324
|
me.myEventCls.onIds("#" + me.pre + "mn6_cameraOrth", "click", function(e) { let ic = me.icn3d; //e.preventDefault();
|
|
59325
|
+
ic.bChangeCamera = true;
|
|
59324
59326
|
ic.setOptionCls.setOption('camera', 'orthographic');
|
|
59325
59327
|
thisClass.setLogCmd('set camera orthographic', true);
|
|
59326
59328
|
});
|
|
@@ -64680,7 +64682,7 @@ class Events {
|
|
|
64680
64682
|
me.myEventCls.onIds(["#" + me.pre + "show_2ddgm", "#" + me.pre + "mn2_2ddgm"], "click", async function(e) { let ic = me.icn3d;
|
|
64681
64683
|
me.htmlCls.dialogCls.openDlg('dl_2ddgm', '2D Diagram');
|
|
64682
64684
|
await ic.viewInterPairsCls.retrieveInteractionData();
|
|
64683
|
-
thisClass.setLogCmd("view
|
|
64685
|
+
thisClass.setLogCmd("view 2d diagram", true);
|
|
64684
64686
|
});
|
|
64685
64687
|
|
|
64686
64688
|
me.myEventCls.onIds("#" + me.pre + "mn2_2ddepiction", "click", async function(e) { let ic = me.icn3d;
|
|
@@ -75054,11 +75056,13 @@ class Scene {
|
|
|
75054
75056
|
|
|
75055
75057
|
ic.fogCls.setFog();
|
|
75056
75058
|
|
|
75057
|
-
ic.
|
|
75058
|
-
|
|
75059
|
-
|
|
75060
|
-
ic.container.whratio
|
|
75061
|
-
|
|
75059
|
+
if(!ic.cam || ic.bChangeCamera) {
|
|
75060
|
+
ic.cameraCls.setCamera();
|
|
75061
|
+
// set the ratio for view point, which was set in ic.transformCls.resetOrientation_base
|
|
75062
|
+
if(!ic.container.whratio) {
|
|
75063
|
+
ic.container.whratio = me.htmlCls.WIDTH / me.htmlCls.HEIGHT;
|
|
75064
|
+
ic.cam.aspect = ic.container.whratio;
|
|
75065
|
+
}
|
|
75062
75066
|
}
|
|
75063
75067
|
|
|
75064
75068
|
if(ic.opts['slab'] === 'yes') ic.cameraCls.setSlab();
|
|
@@ -75242,13 +75246,17 @@ class Scene {
|
|
|
75242
75246
|
}
|
|
75243
75247
|
}
|
|
75244
75248
|
|
|
75245
|
-
ic.perspectiveCamera
|
|
75246
|
-
|
|
75247
|
-
|
|
75249
|
+
if(!ic.perspectiveCamera) {
|
|
75250
|
+
ic.perspectiveCamera = new PerspectiveCamera$1(20, ic.container.whratio, 0.1, 10000);
|
|
75251
|
+
ic.perspectiveCamera.position.set(0, 0, ic.cam_z);
|
|
75252
|
+
ic.perspectiveCamera.lookAt(new Vector3$1(0, 0, 0));
|
|
75253
|
+
}
|
|
75248
75254
|
|
|
75249
|
-
ic.orthographicCamera
|
|
75250
|
-
|
|
75251
|
-
|
|
75255
|
+
if(!ic.orthographicCamera) {
|
|
75256
|
+
ic.orthographicCamera = new OrthographicCamera$1();
|
|
75257
|
+
ic.orthographicCamera.position.set(0, 0, ic.cam_z);
|
|
75258
|
+
ic.orthographicCamera.lookAt(new Vector3$1(0, 0, 0));
|
|
75259
|
+
}
|
|
75252
75260
|
|
|
75253
75261
|
ic.cams = {
|
|
75254
75262
|
perspective: ic.perspectiveCamera,
|
|
@@ -87262,7 +87270,7 @@ class Alternate {
|
|
|
87262
87270
|
}
|
|
87263
87271
|
|
|
87264
87272
|
ic.bShowHighlight = false;
|
|
87265
|
-
|
|
87273
|
+
ic.opts['rotationcenter'] = 'highlight center';
|
|
87266
87274
|
}
|
|
87267
87275
|
|
|
87268
87276
|
// also alternating the surfaces
|
|
@@ -105064,7 +105072,7 @@ class ChainalignParser {
|
|
|
105064
105072
|
targetOrQuery = 'query';
|
|
105065
105073
|
bAppend = true;
|
|
105066
105074
|
}
|
|
105067
|
-
|
|
105075
|
+
console.log("### i " + i + " structArray[i] " + structArray[i]);
|
|
105068
105076
|
//if(structArray[i].length > 4) {
|
|
105069
105077
|
if(isNaN(structArray[i]) && structArray[i].length > 5) { // PDB ID plus postfix could be 5
|
|
105070
105078
|
//let bNoDssp = true;
|
|
@@ -105082,8 +105090,8 @@ class ChainalignParser {
|
|
|
105082
105090
|
// hAtoms = me.hashUtilsCls.unionHash(hAtoms, hAtomsTmp);
|
|
105083
105091
|
}
|
|
105084
105092
|
|
|
105085
|
-
let structArrayAll = Object.keys(ic.structures);
|
|
105086
|
-
|
|
105093
|
+
let structArrayAll = structArray; //Object.keys(ic.structures);
|
|
105094
|
+
console.log("### ic.chains: " + JSON.stringify(ic.chains) + " ic.structures " + JSON.stringify(ic.structures));
|
|
105087
105095
|
ic.opts['color'] = (structArrayAll.length > 1) ? 'structure' : ((structArrayAll[0].length > 5) ? 'confidence' : 'chain');
|
|
105088
105096
|
|
|
105089
105097
|
// add color for all structures
|
|
@@ -116948,7 +116956,7 @@ class ApplyCommand {
|
|
|
116948
116956
|
ic.selectionCls.selectAll();
|
|
116949
116957
|
//ic.hlObjectsCls.addHlObjects();
|
|
116950
116958
|
}
|
|
116951
|
-
else if(command == 'show all') {
|
|
116959
|
+
else if(command == 'show all' || command == 'view all') {
|
|
116952
116960
|
ic.selectionCls.showAll();
|
|
116953
116961
|
}
|
|
116954
116962
|
else if(command == 'select complement') {
|
|
@@ -117328,7 +117336,7 @@ class ApplyCommand {
|
|
|
117328
117336
|
ic.applyCenterCls.centerSelection();
|
|
117329
117337
|
ic.drawCls.draw();
|
|
117330
117338
|
}
|
|
117331
|
-
else if(command == 'show selection') {
|
|
117339
|
+
else if(command == 'show selection' || command == 'view selection') {
|
|
117332
117340
|
ic.selectionCls.showSelection();
|
|
117333
117341
|
}
|
|
117334
117342
|
else if(command == 'hide selection') {
|
|
@@ -117371,12 +117379,12 @@ class ApplyCommand {
|
|
|
117371
117379
|
else if(command == 'delete selected sets') {
|
|
117372
117380
|
ic.definedSetsCls.deleteSelectedSets();
|
|
117373
117381
|
}
|
|
117374
|
-
else if(command == 'view interactions') {
|
|
117382
|
+
else if(command == 'view interactions' || command == 'view 2d diagram') {
|
|
117375
117383
|
if(me.cfg.mmdbid !== undefined || me.cfg.gi !== undefined) {
|
|
117376
117384
|
ic.ParserUtilsCls.set2DDiagrams(ic.inputid);
|
|
117377
117385
|
}
|
|
117378
117386
|
}
|
|
117379
|
-
else if(command == 'show annotations all chains') {
|
|
117387
|
+
else if(command == 'show annotations all chains' || command == 'view annotations all chains') {
|
|
117380
117388
|
ic.annotationCls.showAnnoAllChains();
|
|
117381
117389
|
}
|
|
117382
117390
|
|
|
@@ -117438,7 +117446,7 @@ class ApplyCommand {
|
|
|
117438
117446
|
else if(command == 'clear symd symmetry') {
|
|
117439
117447
|
ic.symdArray = [];
|
|
117440
117448
|
}
|
|
117441
|
-
else if(command == 'show axis') {
|
|
117449
|
+
else if(command == 'show axis' || command == 'view axis') {
|
|
117442
117450
|
ic.bAxisOnly = true;
|
|
117443
117451
|
}
|
|
117444
117452
|
|
|
@@ -117886,7 +117894,7 @@ class ApplyCommand {
|
|
|
117886
117894
|
}
|
|
117887
117895
|
}
|
|
117888
117896
|
else if(commandOri.indexOf('display interaction 3d') == 0
|
|
117889
|
-
|| commandOri.indexOf('view interaction pairs') == 0
|
|
117897
|
+
|| commandOri.indexOf('view interaction pairs') == 0 || commandOri.indexOf('show interaction pairs') == 0
|
|
117890
117898
|
|| commandOri.indexOf('save1 interaction pairs') == 0
|
|
117891
117899
|
|| commandOri.indexOf('save2 interaction pairs') == 0
|
|
117892
117900
|
|| commandOri.indexOf('line graph interaction pairs') == 0
|
|
@@ -117937,7 +117945,7 @@ class ApplyCommand {
|
|
|
117937
117945
|
if(commandOri.indexOf('display interaction 3d') == 0) {
|
|
117938
117946
|
type = '3d';
|
|
117939
117947
|
}
|
|
117940
|
-
else if(commandOri.indexOf('view interaction pairs') == 0) {
|
|
117948
|
+
else if(commandOri.indexOf('view interaction pairs') == 0 || commandOri.indexOf('show interaction pairs') == 0) {
|
|
117941
117949
|
type = 'view';
|
|
117942
117950
|
}
|
|
117943
117951
|
else if(commandOri.indexOf('save1 interaction pairs') == 0) {
|
|
@@ -118297,7 +118305,7 @@ class ApplyCommand {
|
|
|
118297
118305
|
let dataStr = paraArray[1].replace(/\\n/g, '\n');
|
|
118298
118306
|
await ic.refnumCls.parseCustomRefFile(dataStr);
|
|
118299
118307
|
}
|
|
118300
|
-
else if(command.indexOf('show ref number') == 0) {
|
|
118308
|
+
else if(command.indexOf('show ref number') == 0 || command.indexOf('view ref number') == 0) {
|
|
118301
118309
|
ic.bShownRefnum = true;
|
|
118302
118310
|
}
|
|
118303
118311
|
else if(command.indexOf('hide ref number') == 0) {
|
|
@@ -118553,7 +118561,7 @@ class ApplyCommand {
|
|
|
118553
118561
|
else if(cmd.indexOf('set annotation clinvar') == 0) return seqAnnoStr + ': "ClinVar" checkbox';
|
|
118554
118562
|
else if(cmd.indexOf('set annotation snp') == 0) return seqAnnoStr + ': "SNP" checkbox';
|
|
118555
118563
|
else if(cmd.indexOf('set annotation 3ddomain') == 0) return seqAnnoStr + ': "3D Domains" checkbox';
|
|
118556
|
-
else if(cmd.indexOf('view interactions') == 0) return 'Windows > View 2D Diagram';
|
|
118564
|
+
else if(cmd.indexOf('view interactions') == 0 || cmd.indexOf('view 2d diagram') == 0) return 'Windows > View 2D Diagram';
|
|
118557
118565
|
else if(cmd.indexOf('symmetry') == 0) return 'Analysis > Symmetry';
|
|
118558
118566
|
else if(cmd.indexOf('realign on seq align') == 0) return 'File > Realign Selection > on Sequence Alignment';
|
|
118559
118567
|
else if(cmd.indexOf('realign') == 0) return 'File > Realign Selection > Residue by Residue';
|
|
@@ -118645,7 +118653,7 @@ class ApplyCommand {
|
|
|
118645
118653
|
else if(cmd == 'clear all') return 'Select > Clear Selection';
|
|
118646
118654
|
else if(cmd == 'defined sets') return 'Windows > Defined Sets';
|
|
118647
118655
|
else if(cmd == 'delete selected sets') return 'Windows > Defined Sets: "Delete Selected Sets" button';
|
|
118648
|
-
else if(cmd == 'view interactions') return 'Windows > View Interactions';
|
|
118656
|
+
else if(cmd == 'view interactions' || cmd == 'view 2d diagram') return 'Windows > View Interactions';
|
|
118649
118657
|
else if(cmd == 'show annotations all chains') return seqAnnoStr + ': "Show All Chains" button';
|
|
118650
118658
|
else if(cmd == 'save color') return 'Color > Save Color';
|
|
118651
118659
|
else if(cmd == 'apply saved color') return 'Color > Apply Saved Color';
|
|
@@ -119916,7 +119924,7 @@ class LoadScript {
|
|
|
119916
119924
|
|
|
119917
119925
|
await ic.annotationCls.setAnnoTabAll();
|
|
119918
119926
|
}
|
|
119919
|
-
else if(command.indexOf('view interactions') == 0 && me.cfg.align !== undefined) { // the command may have "|||{"factor"...
|
|
119927
|
+
else if((command.indexOf('view interactions') == 0 || command.indexOf('view 2d diagram') == 0) && me.cfg.align !== undefined) { // the command may have "|||{"factor"...
|
|
119920
119928
|
await thisClass.applyCommandViewinteraction(strArray[0].trim());
|
|
119921
119929
|
}
|
|
119922
119930
|
else if(command.indexOf('view 2d depiction') == 0) { // the command may have "|||{"factor"...
|
|
@@ -120127,7 +120135,7 @@ class LoadScript {
|
|
|
120127
120135
|
thisClass.applyCommand3ddomain(lastCommand);
|
|
120128
120136
|
await ic.annotationCls.setAnnoTabAll();
|
|
120129
120137
|
}
|
|
120130
|
-
else if(lastCommand.indexOf('view interactions') == 0 && me.cfg.align !== undefined) {
|
|
120138
|
+
else if((lastCommand.indexOf('view interactions') == 0 || lastCommand.indexOf('view 2d diagram') == 0) && me.cfg.align !== undefined) {
|
|
120131
120139
|
await thisClass.applyCommandViewinteraction(lastCommand);
|
|
120132
120140
|
}
|
|
120133
120141
|
else if(lastCommand.indexOf('view 2d depiction') == 0) {
|
|
@@ -120588,7 +120596,7 @@ class LoadScript {
|
|
|
120588
120596
|
|
|
120589
120597
|
if(commandTransformation.length == 2 && commandTransformation[1].substr(0,1) == '{') ic.bTransformation = true;
|
|
120590
120598
|
|
|
120591
|
-
ic.transformCls.resetOrientation_base(commandTransformation);
|
|
120599
|
+
// ic.transformCls.resetOrientation_base(commandTransformation);
|
|
120592
120600
|
|
|
120593
120601
|
ic.selectionCls.oneStructurePerWindow();
|
|
120594
120602
|
|
|
@@ -120654,8 +120662,12 @@ class LoadScript {
|
|
|
120654
120662
|
$("#ncbi_logo").hide();
|
|
120655
120663
|
}
|
|
120656
120664
|
|
|
120665
|
+
ic.transformCls.resetOrientation_base(commandTransformation);
|
|
120666
|
+
|
|
120657
120667
|
// an extra render to remove artifacts in transparent surface
|
|
120658
|
-
if(ic.bTransparentSurface && ic.bRender) ic.drawCls.render();
|
|
120668
|
+
// if(ic.bTransparentSurface && ic.bRender) ic.drawCls.render();
|
|
120669
|
+
ic.drawCls.applyTransformation(ic._zoomFactor, ic.mouseChange, ic.quaternion);
|
|
120670
|
+
ic.drawCls.render();
|
|
120659
120671
|
|
|
120660
120672
|
if(me.cfg.imageonly) ic.saveFileCls.saveFile(undefined, 'png', undefined, true);
|
|
120661
120673
|
|
|
@@ -133154,7 +133166,7 @@ class iCn3D {
|
|
|
133154
133166
|
|
|
133155
133167
|
this.transparentRenderOrder = false; // false: regular transparency; true: expensive renderOrder for each face
|
|
133156
133168
|
|
|
133157
|
-
this.AFUniprotVersion = '
|
|
133169
|
+
this.AFUniprotVersion = 'v6';
|
|
133158
133170
|
this.defaultPdbId = 'stru';
|
|
133159
133171
|
|
|
133160
133172
|
if(!this.icn3dui.bNode) {
|
|
@@ -133743,7 +133755,7 @@ class iCn3DUI {
|
|
|
133743
133755
|
//even when multiple iCn3D viewers are shown together.
|
|
133744
133756
|
this.pre = this.cfg.divid + "_";
|
|
133745
133757
|
|
|
133746
|
-
this.REVISION = '3.45.
|
|
133758
|
+
this.REVISION = '3.45.4';
|
|
133747
133759
|
|
|
133748
133760
|
// In nodejs, iCn3D defines "window = {navigator: {}}", and added window = {navigator: {}, "__THREE__":"177"}
|
|
133749
133761
|
this.bNode = (Object.keys(window).length < 3) ? true : false;
|