Rolf Huehne wrote:
> Bob Hanson wrote:
>   
>> right! I got mixed up in all the negatives. This is better:
>> function _jmolGetAppletSize(size) {
>>   var width, height;
>>   var type = typeof size;
>>   if (type == "object" && size != null) {
>>     width = size[0]; height = size[1];
>>   } else {
>>     width = height = size;
>>   }
>>   if (typeof width == "number") {
>>         width = (width >= 25 && width <= 2000 ? width + "px"
>>      : width < 1 && width > 0 ? (width * 100)+"%":"300px")
>>   }
>>   if (typeof height == "number") {
>>         height = (height >= 25 && height <= 2000 ? height + "px"
>>      : height < 1 && height > 0 ? (height * 100)+"%":"300px")
>>   }
>>   return [width, height];
>> }
>>
>>   
>>     
> Hi Bob,
>
> I noticed that you allow in your subroutine only a maximum value of 2000
> pixels. This seems to be unnecessary. With your example resizable applet
> window I could get an applet with >6000 pixels without any obvious
> problem. Therefore the 2000 pixels seem to be just an unnecessary (?)
> restriction of the code setting the initial applet size.
>
> Your resizing example at
> "http://www.stolaf.edu/academics/chemapps/jmol/docs/examples-11/new.htm";
> works well in Firefox 1.5.0.9 and Konqueror 3.4.0 on SuSE Linux 9.3. The
> visible molecule part is always the same, only the size changes (as
> expected). But if I set the size to a specific value the applet content
> is only adapted if it is enlarged. If the applet size is reduced, no
> adaptation is done (as reported a few days ago on the developers list)
> and most of the content is invisible afterwards.
>
>   

I just noticed a strange behaviour related to this. If I request an
image from Jmol (11.1.18, StOlaf) after downsizing the applet, the image
delivered has still the larger size. So it looks as if the resizing
information isn't delivered to all necessary places.

Regards,
Rolf

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to