Hi, We recently got around this problem in PeptideAtlas by creating an iFrame for each Lorikeet viewer; this allows the page to have as many spectra as we desire with a seamless look. I imagine that you could add some Javascript to dynamically add/destroy an iFrame for every spectrum that you wish to render. Hope this helps! --Luis
On Mon, Jan 9, 2012 at 7:13 AM, Gautam Saxena <[email protected]> wrote: > So we noticed even more odd things (which hopefully someone can shed > light on and/or it may help whomever is trying to fix/improve > Lorikeet, per Luis's message above): > > 1) If we call Lorikeet from our program the 1st time, everything works > fine. (NOTE: We do NOT open up a new tab; instead, we just stick the > spectra viewer into its own window, i.e, "div id" element.) However, > if we then close that spectrum viewer (ie delete the div id element) > and then try to open up another spectra, it will work 100% fine (as > far as we know) if and ONLY if the 2nd spectra that we're trying to > view has an observed mass that is LOWER than the observed mass of the > 1st spectra!!!! So, we're not sure why > > 1) opening up the 1st spetra should have any effect on the opening up > of the 2nd spectra (we're not javascript experts), but we suspect it's > because Lorikeet creates some sort of global variables (per Luis's > message below) for the given html/js page, even when the div id's get > destroyed; and, > 2) opening up a second spectra fails if the second spectra's observed > mass is greater than the 1st spectra's observed mass! > > We did these tests in Google Chrome browser. > > > On Nov 22 2011, 5:31 pm, Luis Mendoza > <[email protected]> wrote: >> Hello, >> You are indeed correct: it is not possible to have multiple Lorikeet >> instances present in a single html page. We tried doing that in >> PeptideAtlas some time ago, and the culprit(s) seem to be that several of >> the helper divs have hard-coded ids and they clash, as you found. A first >> stab at getting this to work would be to have each Lorikeet instance have a >> parent id that becomes part of the chlidren div ids, though perhaps there >> are better solutions for this. >> >> This feature is on our short-list of desired improvements, but let us know >> if you beat us to it and have code that you can contribute back to us! >> --Luis >> >> >> >> >> >> >> >> On Tue, Nov 22, 2011 at 1:18 PM, Gautam Saxena <[email protected]> wrote: >> > I'm no expert with html stuff, however: can anyone confirm whether >> > Lorikeet is designed in such a way that it is NOT possible to have >> > more than 1 LoriKeet-derived spectra appear in a given html page? (It >> > seems to get confused, with overlapping spectra; furthermore, in our >> > tests, only 1 of the 2 spectra actually got displayed, though it got >> > displayed twice, once for each "div id" that I had in the html file.). >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "spctools-discuss" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]. >> > For more options, visit this group at >> >http://groups.google.com/group/spctools-discuss?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "spctools-discuss" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/spctools-discuss?hl=en. > -- You received this message because you are subscribed to the Google Groups "spctools-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/spctools-discuss?hl=en.
