I want to make my wydiwys presentation tool autoscale single
images to the browser window.  I want to fill as much of the
window as I can, while preserving the image aspect ratio. 
The math is easy, but learning the pixel height of the inside
of the browser window is surprisingly difficult.

I am using javascript and jQuery with the webslide pages.  Right
now, I am scaling the image to 100% height, querying it to see
what the height turns out to be, then rescaling down if it slops
over on width.  Which joggles the display if the browser window
is tall and narrow.   It would be nicer to know how big the window
is, do the math, and display the image correctly the first time.

I'm pretty new to all this, and a lousy programmer.  Can anyone
suggest some browser-independent(*) code that will provide the
height of the inside bounding box, and perhaps explain a little
bit of how it works and what might break it?  

Keith

(*) Okay, screw the really old browsers, but IE7/8, Firefox 2/3,
Chrome, Safari, etc.  jQuery is cool because it provides a cross
platform API, but I haven't found a function that does what I want.

(ObRelevance) Wydiwys is open source, works best on Linux,  and
will hopefully replace a lot of closed source tools.

-- 
Keith Lofstrom          [email protected]         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to