Thomas,

I don’t know a lot about Bootstrap. It’s available on a development app that 
I’ve been using (HTML Egg) and love, but I stayed away from the Bootstrap 
component because it defaults to putting mobile devices first. Maybe Angel and 
Bob know more about Bootstrap.

I will say that JSmol in a page developed for laptop/desktop use works well on 
iPads and other tablets. Smart phones are another story entirely, but I’m not 
sure that smart phones are good for much more than “see the pretty molecule 
spin” application development!

The mobile first concept is great - write so that you don’t degrade when 
detecting mobile. But another way of looking at this is write for the lowest 
common denominator.

Curious: Are your JSmol divs positioned as absolute or relative? I was assuming 
absolute in a previous email about masking, but in retrospect, I guess absolute 
would mess up the whole resize concept. I have to admit that the thing I love 
about HTML Egg is that it lets me forget about layout specifics. Having said 
this, it’s most powerful when you use it in absolute position mode. It creates 
absolutely bizarre CSS and HTML for layout, but boy does it work with ease. Is 
Bootstrap doing the same thing by default - i.e. giving you absolute 
positioning?

Otis

--
Otis Rothenberger
o...@chemagic.com
http://chemagic.com

> On Jul 13, 2015, at 6:34 PM, Thomas Hrabe <thr...@gmail.com> wrote:
> 
> Thank you for all the responses.
> 
> I am using Bootstrap to layout the page. The problem is that the divs where 
> the jsmol view will go into are empty on load.
> When I specify ‘100%’ as width for the jsmol view, I get 
> 
> Uncaught IndexSizeError: Failed to execute 'getImageData' on 
> 'CanvasRenderingContext2D': The source height is 0.
> 
> I want the page to be responsive to any size. 
> 
> Thanks,
> Thomas
> 
>> On Jul 8, 2015, at 5:22 PM, Thomas Hrabe <thr...@gmail.com> wrote:
>> 
>> Despite Angel’s answer, I yet have not figured out one thing:
>> 
>> I am using a responsive framework, so when the size of the jsmol container 
>> changes, the size of the jsmol view does not adapt and starts overlaping 
>> other elements.
>> How can I make it dynamic?
>> 
>> Thanks,
>> Thomas
>> 
>>> On Jun 30, 2015, at 3:33 PM, Angel Herráez <angel.herr...@uah.es> wrote:
>>> 
>>> Hi, Thomas
>>> 
>>> If the container has a declared size (usually with css), just give JSmol 
>>> 100%:
>>> 
>>> var Info = {
>>>  height: "100%",
>>>  width: "100%"
>>> };
>>> Jmol.getApplet("myJmol", Info);
>>> 
>>> 
>> 
> 
> 
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users




------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to