icn3d 3.26.5 → 3.26.6

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.module.js CHANGED
@@ -45388,7 +45388,7 @@ class LineGraph {
45388
45388
  pdb_query = header + pdb_query;
45389
45389
 
45390
45390
  let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbArray[index]};
45391
- let alignAjax = (me.bNode) ? me.getAjaxPostPromise(urltmalign, dataObj, undefined, undefined, undefined, undefined, undefined, true) : me.getAjaxPostPromise(urltmalign, dataObj);
45391
+ let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj, undefined, undefined, undefined, undefined, undefined, true) ;
45392
45392
  ajaxArray.push(alignAjax);
45393
45393
 
45394
45394
  domainidpairArray.push(domainid + "|" + ic.refpdbArray[index]);
@@ -72496,58 +72496,91 @@ iCn3DUI.prototype.setIcn3d = function() { let me = this;
72496
72496
  me.setDialogAjax();
72497
72497
  };
72498
72498
 
72499
- iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess, logMess, complete) { let me = this;
72500
- return new Promise(function(resolve, reject) {
72501
- $.ajax({
72502
- url: url,
72503
- dataType: dataType,
72504
- cache: true,
72505
- beforeSend: function() {
72506
- if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
72507
- },
72508
- complete: function() {
72509
- if(complete) me.icn3d.ParserUtilsCls.hideLoading();
72510
- },
72511
- success: function(data) {
72512
- resolve(data);
72513
- },
72514
- error : function() {
72515
- if(alertMess) alert(alertMess);
72516
- if(logMess) console.log(logMess);
72517
-
72518
- reject('error');
72519
- }
72499
+ iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess, logMess, complete, bNode) { let me = this;
72500
+ // if(!bNode || dataType != 'json') {
72501
+ return new Promise(function(resolve, reject) {
72502
+ $.ajax({
72503
+ url: url,
72504
+ dataType: dataType,
72505
+ cache: true,
72506
+ beforeSend: function() {
72507
+ if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
72508
+ },
72509
+ complete: function() {
72510
+ if(complete) me.icn3d.ParserUtilsCls.hideLoading();
72511
+ },
72512
+ success: function(data) {
72513
+ resolve(data);
72514
+ },
72515
+ error : function() {
72516
+ if(alertMess) alert(alertMess);
72517
+ if(logMess) console.log(logMess);
72518
+
72519
+ reject('error');
72520
+ }
72521
+ });
72520
72522
  });
72521
- });
72523
+ // }
72524
+ // else {
72525
+ // return new Promise(async function(resolve, reject) {
72526
+ // const response = await fetch(url);
72527
+
72528
+ // response.json().then(function(data) {
72529
+ // resolve(data);
72530
+ // }).catch(function(error) {
72531
+ // reject('error');
72532
+ // });
72533
+ // });
72534
+ // }
72522
72535
  };
72523
72536
 
72524
- iCn3DUI.prototype.getAjaxPostPromise = function(url, data, beforeSend, alertMess, logMess, complete, dataType) { let me = this;
72537
+ iCn3DUI.prototype.getAjaxPostPromise = async function(url, data, beforeSend, alertMess, logMess, complete, dataType, bNode) { let me = this;
72525
72538
  dataType = (dataType) ? dataType : 'json';
72526
72539
 
72527
- return new Promise(function(resolve, reject) {
72528
- $.ajax({
72529
- url: url,
72530
- type: 'POST',
72531
- data : data,
72532
- dataType: dataType,
72533
- cache: true,
72534
- beforeSend: function() {
72535
- if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
72536
- },
72537
- complete: function() {
72538
- if(complete) me.icn3d.ParserUtilsCls.hideLoading();
72539
- },
72540
- success: function(data) {
72541
- resolve(data);
72542
- },
72543
- error : function() {
72544
- if(alertMess) alert(alertMess);
72545
- if(logMess) console.log(logMess);
72546
-
72547
- reject('error');
72548
- }
72540
+ // if(!bNode || dataType != 'json') {
72541
+ return new Promise(function(resolve, reject) {
72542
+ $.ajax({
72543
+ url: url,
72544
+ type: 'POST',
72545
+ data : data,
72546
+ dataType: dataType,
72547
+ cache: true,
72548
+ beforeSend: function() {
72549
+ if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
72550
+ },
72551
+ complete: function() {
72552
+ if(complete) me.icn3d.ParserUtilsCls.hideLoading();
72553
+ },
72554
+ success: function(data) {
72555
+ resolve(data);
72556
+ },
72557
+ error : function() {
72558
+ if(alertMess) alert(alertMess);
72559
+ if(logMess) console.log(logMess);
72560
+
72561
+ reject('error');
72562
+ }
72563
+ });
72549
72564
  });
72550
- });
72565
+ // }
72566
+ // else {
72567
+ // return new Promise(async function(resolve, reject) {
72568
+ // const response = await fetch(url, {
72569
+ // method: 'POST',
72570
+ // headers: {
72571
+ // 'Accept': 'application/json',
72572
+ // 'Content-Type': 'application/json'
72573
+ // },
72574
+ // body: data
72575
+ // });
72576
+
72577
+ // response.json().then(function(data) {
72578
+ // resolve(data);
72579
+ // }).catch(function(error) {
72580
+ // reject('error');
72581
+ // });
72582
+ // });
72583
+ // }
72551
72584
  };
72552
72585
 
72553
72586
  iCn3DUI.prototype.setDialogAjax = function() { let me = this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "icn3d",
3
- "version": "3.26.5",
3
+ "version": "3.26.6",
4
4
  "main": "./icn3d.js",
5
5
  "exports": {
6
6
  ".": {