https://github.com/nrnb/mirna-pathway-finder
Tip revision: 2a75f42dd8d65b42c60e38bffbab2e96f520a401 authored by Alexander Pico on 09 March 2018, 01:18:03 UTC
Create README.md
Create README.md
Tip revision: 2a75f42
update-widget.js
window.addEventListener('click', function() {
function updateWidget(identifier) {
var widget = d3.select('#wikipathways-widget').selectAll('iframe')
.data([3])
.attr('src', 'http://www.wikipathways.org/wpi/PathwayWidget.php?id=' + identifier + '&' + highlightString);
widget.enter().append('iframe')
.attr('src', 'http://www.wikipathways.org/wpi/PathwayWidget.php?id=' + identifier + '&' + highlightString)
.attr('width', '600px')
.attr('height', '300px')
.attr('style', 'overflow:hidden;');
widget.exit().remove();
}
d3.select('#pathway-to-mirna')
.selectAll('tr')
.select('#name')
.filter(function(d) {
return this;
})
.on('click', function(event) {
var identifier = d3.select(this.parentNode).select('#identifier').text();
console.log('identifier');
console.log(identifier);
updateWidget(identifier);
});
});