PDA

View Full Version : embedding laszlo apps in a web page


lyndonwong
09-16-2003, 04:40 PM
Hi Laszlo,

Thx much for hosting my 'simple weather widget' at:

http://www.mylaszlo.com/lps/lyndonwong/weather_widget/weather_widget.lzx

Unfortunately, I have a scaling problem when I embed it into the gutter of a test blog at:
http://lyndolab.blogspot.com/

The resulting widget is scaled to about 1/4 original size. Could this be related to the width & height values generated by mylaszlo for the <embed> and <object> tags?

The weather_widget's actual size is 180x180 pixels, but the embed tag is set to width=500 and height=400.

By contrast, the Laszlo Blogging Widget at:
http://www.mylaszlo.com/lps/ows/lbw/lbw.lzx
has widthxheight = 150x200, which probably conforms to that widget's actual size.

Any idea what the cause and fix are for my issue? -- thx much

antun
09-16-2003, 04:57 PM
The canvas dimensions need to match those of the <object> and <embed> tags in the HTML. Most likely they do not in your case.

Just like with an image in an HTML page, the app will look skewed if they do not. If you didn't specify canvas dimensions in your app, they will default to 800 by 600. I've fixed this in the lzx file that's on mylaszlo.com. You should explicitly set the object and embed tags yourself.

-Antun

lyndonwong
09-16-2003, 05:33 PM
That did the trick. I have some graphic 'clipping' problems to address, but I'll fix those with a rev of the code to improve some UI behavior (like capturing a 'return' key press)

thanks for the help!