Skip to content
Snippets Groups Projects
Commit ac211b00 authored by Ibrahim Roshan Kunnakkattu's avatar Ibrahim Roshan Kunnakkattu
Browse files

support for total interactions

parent 062a19bd
No related branches found
No related tags found
1 merge request!5Refactored code for diplaying aggregated ligand interactions
......@@ -14,7 +14,7 @@
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"
charset="utf-8"></script>
<!--PDBe interactions component-->
<script type="module" src="http://127.0.0.1:8080/pdb-ligand-env-component-1.0.0-min.js"></script>
<script type="module" src="http://127.0.0.1:8080/pdb-ligand-env-component-2.0.0-min.js"></script>
</head>
......@@ -23,7 +23,7 @@
<!--Mode A-->
<div style="position: relative; float: left;">
<div style="width: 500px; height: 500px; position: relative">
<pdb-ligand-env pdb-res-name="STI", contact-type="total"></pdb-ligand-env>
<pdb-ligand-env pdb-res-name="STI", contact-type='["TOTAL"]'></pdb-ligand-env>
</div>
</div>
......
......@@ -520,11 +520,20 @@ namespace Model {
private getFilteredData(){
const filteredData = new Array();
for (const contactType in this.data){
if (this.contactTypes.includes(contactType)){
const dataContactTypes = Object.keys(this.data);
if(this.contactTypes.includes('TOTAL')){
for (const contactType of dataContactTypes){
filteredData.push(...this.data[contactType].map(this.getAtomResidueObj));
}
}
else{
for (const contactType of this.contactTypes){
if (dataContactTypes.includes(contactType)){
filteredData.push(...this.data[contactType].map(this.getAtomResidueObj));
}
}
}
return filteredData
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment