icn3d 3.26.4 → 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.js CHANGED
@@ -44487,7 +44487,7 @@ class LineGraph {
44487
44487
  pdb_query = header + pdb_query;
44488
44488
 
44489
44489
  let dataObj = {'pdb_query': pdb_query, 'pdb_target': pdb_target, "queryid": ic.refpdbArray[index]};
44490
- let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj);
44490
+ let alignAjax = me.getAjaxPostPromise(urltmalign, dataObj, undefined, undefined, undefined, undefined, undefined, true) ;
44491
44491
  ajaxArray.push(alignAjax);
44492
44492
 
44493
44493
  domainidpairArray.push(domainid + "|" + ic.refpdbArray[index]);
@@ -71595,58 +71595,91 @@ iCn3DUI.prototype.setIcn3d = function() { let me = this;
71595
71595
  me.setDialogAjax();
71596
71596
  };
71597
71597
 
71598
- iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess, logMess, complete) { let me = this;
71599
- return new Promise(function(resolve, reject) {
71600
- $.ajax({
71601
- url: url,
71602
- dataType: dataType,
71603
- cache: true,
71604
- beforeSend: function() {
71605
- if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
71606
- },
71607
- complete: function() {
71608
- if(complete) me.icn3d.ParserUtilsCls.hideLoading();
71609
- },
71610
- success: function(data) {
71611
- resolve(data);
71612
- },
71613
- error : function() {
71614
- if(alertMess) var aaa = 1; //alert(alertMess);
71615
- if(logMess) console.log(logMess);
71616
-
71617
- reject('error');
71618
- }
71598
+ iCn3DUI.prototype.getAjaxPromise = function(url, dataType, beforeSend, alertMess, logMess, complete, bNode) { let me = this;
71599
+ // if(!bNode || dataType != 'json') {
71600
+ return new Promise(function(resolve, reject) {
71601
+ $.ajax({
71602
+ url: url,
71603
+ dataType: dataType,
71604
+ cache: true,
71605
+ beforeSend: function() {
71606
+ if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
71607
+ },
71608
+ complete: function() {
71609
+ if(complete) me.icn3d.ParserUtilsCls.hideLoading();
71610
+ },
71611
+ success: function(data) {
71612
+ resolve(data);
71613
+ },
71614
+ error : function() {
71615
+ if(alertMess) var aaa = 1; //alert(alertMess);
71616
+ if(logMess) console.log(logMess);
71617
+
71618
+ reject('error');
71619
+ }
71620
+ });
71619
71621
  });
71620
- });
71622
+ // }
71623
+ // else {
71624
+ // return new Promise(async function(resolve, reject) {
71625
+ // const response = await fetch(url);
71626
+
71627
+ // response.json().then(function(data) {
71628
+ // resolve(data);
71629
+ // }).catch(function(error) {
71630
+ // reject('error');
71631
+ // });
71632
+ // });
71633
+ // }
71621
71634
  };
71622
71635
 
71623
- iCn3DUI.prototype.getAjaxPostPromise = function(url, data, beforeSend, alertMess, logMess, complete, dataType) { let me = this;
71636
+ iCn3DUI.prototype.getAjaxPostPromise = async function(url, data, beforeSend, alertMess, logMess, complete, dataType, bNode) { let me = this;
71624
71637
  dataType = (dataType) ? dataType : 'json';
71625
71638
 
71626
- return new Promise(function(resolve, reject) {
71627
- $.ajax({
71628
- url: url,
71629
- type: 'POST',
71630
- data : data,
71631
- dataType: dataType,
71632
- cache: true,
71633
- beforeSend: function() {
71634
- if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
71635
- },
71636
- complete: function() {
71637
- if(complete) me.icn3d.ParserUtilsCls.hideLoading();
71638
- },
71639
- success: function(data) {
71640
- resolve(data);
71641
- },
71642
- error : function() {
71643
- if(alertMess) var aaa = 1; //alert(alertMess);
71644
- if(logMess) console.log(logMess);
71645
-
71646
- reject('error');
71647
- }
71639
+ // if(!bNode || dataType != 'json') {
71640
+ return new Promise(function(resolve, reject) {
71641
+ $.ajax({
71642
+ url: url,
71643
+ type: 'POST',
71644
+ data : data,
71645
+ dataType: dataType,
71646
+ cache: true,
71647
+ beforeSend: function() {
71648
+ if(beforeSend) me.icn3d.ParserUtilsCls.showLoading();
71649
+ },
71650
+ complete: function() {
71651
+ if(complete) me.icn3d.ParserUtilsCls.hideLoading();
71652
+ },
71653
+ success: function(data) {
71654
+ resolve(data);
71655
+ },
71656
+ error : function() {
71657
+ if(alertMess) var aaa = 1; //alert(alertMess);
71658
+ if(logMess) console.log(logMess);
71659
+
71660
+ reject('error');
71661
+ }
71662
+ });
71648
71663
  });
71649
- });
71664
+ // }
71665
+ // else {
71666
+ // return new Promise(async function(resolve, reject) {
71667
+ // const response = await fetch(url, {
71668
+ // method: 'POST',
71669
+ // headers: {
71670
+ // 'Accept': 'application/json',
71671
+ // 'Content-Type': 'application/json'
71672
+ // },
71673
+ // body: data
71674
+ // });
71675
+
71676
+ // response.json().then(function(data) {
71677
+ // resolve(data);
71678
+ // }).catch(function(error) {
71679
+ // reject('error');
71680
+ // });
71681
+ // });
71682
+ // }
71650
71683
  };
71651
71684
 
71652
71685
  iCn3DUI.prototype.setDialogAjax = function() { let me = this;