eweitz / ideogram

Chromosome visualization for the web
https://eweitz.github.io/ideogram
Other
294 stars 71 forks source link

Add observable event for pathway diagrams #371

Closed eweitz closed 3 months ago

eweitz commented 3 months ago

This makes new pathway diagrams (#370) adaptable and programmable in more embedding contexts.

For example, clients can use code like the following to hook into the pathway draw completion event:

document.addEventListener('ideogramDrawPathway', function(event) {
  const {pathwayViewer, pwId, sourceGene, destGene, dimensions} = event.detail
  clientsCustomPathwayEnhancement(pathwayViewer, pwId, sourceGene, destGene, dimensions)
})