thatcher / openseadragon

This project has moved to its new github organization at github.com/openseadragon, please join us!
http://openseadragon,github.com/
37 stars 14 forks source link

Custom Controls CSS not being passed to full page #30

Closed dustmoo closed 11 years ago

dustmoo commented 11 years ago

It seems that if we add a custom control to the viewer:

var viewer = new OpenSeadragon({id: "sea_viewer"});
cust_ctr_element = document.createElement('div');
cust_ctr_element.id = "custom_control_box"
viewer.addControl(cust_ctr_element, OpenSeadragon.ControlAnchor.TOP_RIGHT);

Styles applied to #custom_control_box work fine in the page, but are not passed to fullscreen.

I'll be looking into a fix next week. If anyone has a solution before then, please let me know. :)

Thanks,

Dustin

dustmoo commented 11 years ago

Scratch that.

The problem was I was appending the style sheet to the body tag in my script. And full page removes all of the body elements.

I don't necessarily think this always a good thing. There may be some instances when a user wants certain elements to remain that may not be inside the OpenSeadragon object.

That said, CSS is being passed properly as long as the style element is not in the body element.

Dustin