dasmoth / dalliance

Interactive web-based genome browser.
http://www.biodalliance.org/
BSD 2-Clause "Simplified" License
226 stars 68 forks source link

onReady callback? #98

Closed doomedramen closed 9 years ago

doomedramen commented 9 years ago

Is there an onReady callback in dalliance or anything similar?

Cheers

dasmoth commented 9 years ago

Something like:

        var b  = new Browser({/*config*/});
        b.addInitListener(function() {
              console.log('Initialised');
        })

might do what you want. Listeners are called after the container is initialised and tier objects are created, but generally before any data has loaded. Is this good enough?

There might be an argument for a "loading is complete" event as well, but the semantics of this are really hard, especially if the user initiates and kind of navigation before the initial set of data loads are all complete.