Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

div elements and embedding

#65

Hi guys

I'm new to jbrowse (about 12 h). But I've been trying to understand more about embedding (currently wish to make a Drupal module). Somewhere in the tundra.css there is something that prevents nesting the genomebrowser div element (e.g. try adding

in a mock index.html). Some inheritance somewhere? I was wondering, how can I find out why this is happening (to fix it)?

many thanks
alexie

Reported by Alexie Papanicolaou · September 25th, 2010 @ 09:31 AM

State: resolved
Milestone: none
Assigned to: Mitch Mitch

Activity

  1. Mitch
    Mitch

    Hi,

    It's not totally clear to me what's going on in your case; can you send me your mock index.html, or a link to the HTML that you're experimenting with?

    The index.html file included with JBrowse does, I think, what you're talking about: it has a div in it, and JBrowse lives inside that div.

    The only issues I know about with embedding have to do with potential name collisions in the CSS or javascript.

    What are you actually seeing when you try to embed JBrowse?

    September 25th, 2010 @ 03:48 PM

  2. Alexie Papanicolaou
    Alexie Papanicolaou

    Hello

    Sorry, I was not clear.

    For example, in the index.html shipped with jbrowse, the following works:

    <div id="GenomeBrowser" style="height: 100%; width: 100%; padding: 0; border: 0;"></div>
    

    But the following does not:


    <div id="GenomeBrowser" style="height: 100%; width: 100%; padding: 0; border: 0;"></div>
    

    If we use the tundra.css from the dojo repository there is no issue (or if we use any other theme) but it naturally is missing some of the jbrowse customizations so it doesn't display correctly.

    I know too little about css to be of any help...

    thanks
    a

    Alexie Papanicolaou
    OCE PostDoctoral Fellow in Bioinformatics
    CSIRO Ecosystem Sciences
    Black Mountain Labs
    Clunies Ross St
    Canberra ACT 2601
    Australia

    September 26th, 2010 @ 02:17 AM

  3. Alexie Papanicolaou
    Alexie Papanicolaou

    That didn't come out, should have read the help/preview (why does every system have their own formatting code...)

    works:
    @@@ HTML

     <div id="GenomeBrowser" style="height: 100%; width: 100%; padding: 0; border: 0;"></div>
    
    not works:
    @@@ HTML
        <div>
        <div id="GenomeBrowser" style="height: 100%; width: 100%; padding: 0; border: 0;"></div>
        </div>
    

    September 26th, 2010 @ 02:20 AM

  4. Mitch
    Mitch

    Give the outer div a width and height, e.g.

    <div style="height:  800px; width: 500px;">
      <div id="GenomeBrowser" style="height: 100%; width: 100%; padding: 0; border: 0;"></div>
    </div>
    

    September 26th, 2010 @ 11:33 AM

  5. Alexie Papanicolaou
    Alexie Papanicolaou

    Hi Mitch

    Thanks for the quick reply. That works! I guess I should go learn some CSS...

    a

    September 26th, 2010 @ 02:57 PM

  6. Mitch
    Mitch
    • State changed from new to resolved

    Cool! I'm going to go ahead and close this ticket. If you run into other difficulties with embedding (like I mentioned, there may be CSS or JS name collisions, depending on how things are named in the environment in which JBrowse is embedded) then let's make those separate tickets.

    September 26th, 2010 @ 04:52 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.