CharisKomos (Talk | contribs) |
CharisKomos (Talk | contribs) |
||
Line 117: | Line 117: | ||
leftElements.forEach(function(item, index, array){ | leftElements.forEach(function(item, index, array){ | ||
if(item.id != element.id){ | if(item.id != element.id){ | ||
− | |||
− | |||
− | |||
− | |||
svgDoc.getElementById(item.image_id).setAttribute('display', 'none'); | svgDoc.getElementById(item.image_id).setAttribute('display', 'none'); | ||
+ | }else{ | ||
+ | svgDoc.getElementById(item.image_id).setAttribute('display', 'block'); | ||
} | } | ||
}); | }); | ||
rightElements.forEach(function(item, index, array){ | rightElements.forEach(function(item, index, array){ | ||
if(item.id != element.id){ | if(item.id != element.id){ | ||
− | |||
− | |||
− | |||
− | |||
svgDoc.getElementById(item.image_id).setAttribute('display', 'none'); | svgDoc.getElementById(item.image_id).setAttribute('display', 'none'); | ||
+ | }else{ | ||
+ | svgDoc.getElementById(item.image_id).setAttribute('display', 'block'); | ||
} | } | ||
}); | }); | ||
Line 163: | Line 159: | ||
leftElements.forEach(function(item, index, array){ | leftElements.forEach(function(item, index, array){ | ||
svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | ||
− | svgDoc.getElementById(item.image_id).setAttribute(' | + | svgDoc.getElementById(item.image_id).setAttribute('display', 'none'); |
svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionalityClick(item) }); | svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionalityClick(item) }); | ||
svgDoc.getElementById(item.id).addEventListener('mouseover', function(){ svgFunctionalityHover(item) }); | svgDoc.getElementById(item.id).addEventListener('mouseover', function(){ svgFunctionalityHover(item) }); | ||
Line 170: | Line 166: | ||
rightElements.forEach(function(item, index, array){ | rightElements.forEach(function(item, index, array){ | ||
svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | ||
− | svgDoc.getElementById(item.image_id).setAttribute(' | + | svgDoc.getElementById(item.image_id).setAttribute('display', 'none'); |
svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionalityClick(item) }); | svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionalityClick(item) }); | ||
svgDoc.getElementById(item.id).addEventListener('mouseover', function(){ svgFunctionalityHover(item) }); | svgDoc.getElementById(item.id).addEventListener('mouseover', function(){ svgFunctionalityHover(item) }); |
Revision as of 19:55, 22 October 2017
Click on the miRNAs to get to know us!