biocore / emperor

Emperor a tool for the analysis and visualization of large microbial ecology datasets
http://biocore.github.io/emperor/
Other
52 stars 50 forks source link

Issues in Embedding Emperor as Standalone Plugin Into Web Pages #794

Open dhakim87 opened 3 years ago

dhakim87 commented 3 years ago

Some notes from my efforts to embed Emperor into the microsetta results page:

Adding these comments here to ensure we are tracking them:

  1. Raytracing broken when not scrolled to top of the screen
    1. See if this can be fixed by setting a fixed height of 500 px for emperor-notebook div. "height: 500px !important;"
  2. How to handle versioning?
    1. Manually update every time we want to update
    2. Use emperor's python api to find the support files - write a script that copies them into your source tree as part of the build process
    3. Some minified js script at a fixed location?
  3. What would a javascript only integration look like? How to embed on an existing page? (See emperor_loader.js as my prototype)
  4. Some kind of method to dispose of an emperor control when we're done with it? (Currently leaks several DOM objects outside of the specified ID in the DOM)

Continued integration notes:

  1. Loading emperor control with requirejs exactly as implemented in index.html of qzv files interferes with existing jquery plugins in a webpage - consider JQuery.noConflicts
  2. Exceptions thrown inside of emperor due to bad config (specify color for a category that does not exist) will fail silently in such a way that the current emperor instance continues to run, but attempting to remove the emperor widget and replace it will fail. Would prefer that these are either fully handled, or bubble up loudly enough to show something is wrong.