[Laszlo-dev] Query args width and height processed by LaszloCanvas.lzs#construct()

Raju Bitter rajubitter at me.com
Mon Jul 20 13:59:18 PDT 2009


Yes, I know that the LaszloCanvas code is looking for those args.  
Isn't it like there are 4 sources for the width/height value?

1) canvas attributes
2) embedding code
3) query args for SWF file
4) default values 400/400, in case the query args contain an invalid  
value

But what you are saying means: if a developer wants to use full screen  
feature, he must take caution not pass any values for width and height  
into the app at runtime, or full screen mode might not auto-adjust the  
canvas size.


On Jul 20, 2009, at 5:18 PM, P T Withington wrote:

> I don't know the history, but notice that the canvas is _looking_  
> for those params.  It's not that query params override an  
> application var or setting (which could be a security issue).  The  
> developer of the canvas specifically asks for these params.
>
> The history of canvas size is long and tortured, and there are a lot  
> of crazy paths in the compiler to handle absolute vs. percentage  
> sizing.  I am a big proponent for letting the size be dynamic, taken  
> from the browser or query args, rather than having to recompile your  
> app to resize it.
>
> On 2009-07-19, at 11:21EDT, Max Carlson wrote:
>
>> Perhaps we want a different behavior when fullscreen is on.  It  
>> should act much more like the default of 100% by 100%. Maybe the  
>> part of canvas.construct() that registers for screen size  
>> notifications should be refactored to a separate method so it can  
>> be called when fullscreen is turned on...
>>
>> -----Original Message-----
>> From: Raju Bitter <rajubitter at me.com>
>> Sent: Sunday, July 19, 2009 8:47 AM
>> To: Raju Bitter <rajubitter at me.com>
>> Cc: Laszlo-dev bug reporting <laszlo-dev at openlaszlo.org>
>> Subject: Re: [Laszlo-dev] Query args width and height processed by  
>> LaszloCanvas.lzs#construct()
>>
>> And if you don't want to read the forum post: he attached a width and
>> height parameter to the SWF for whatever reason (customer
>> requirement), and never expected that to influence the behavior full
>> screen.
>>
>> So my question actually is:
>> 1) is it a documented behavior, that you can override width and  
>> height
>> with query vars
>> 2) if it's a documented behavior or a "feature", I need to mention in
>> the fullscreen documentation what effect it will have
>>
>> On Jul 19, 2009, at 4:41 PM, Raju Bitter wrote:
>>
>>> That means: if you have the app running at 600x600 without full
>>> screen, and you go into full screen on a 1440x900 screen, the canvas
>>> will remain at 600x600 in the upper left corner of the screen.
>>>
>>> Of course you can easily avoid that by NOT passing any value through
>>> query vars into the Laszlo app, but if you look into the forum post
>>> that caused this discussion you'll see that a user got confused by
>>> that behavior.
>>>
>>> I was just investigating what's going on to help this guy.
>>>
>>> On Jul 19, 2009, at 3:46 PM, Sarah Allen wrote:
>>>
>>>> um... so what is the conflict?
>>>>
>>>> On Jul 19, 2009, at 6:30 AM, Raju Bitter wrote:
>>>>
>>>>> Actually it happens on canvas construction, in the construct()
>>>>> method. Which means, it overrides the values in your <canvas />
>>>>> declaration within LZX. As a result canvas will - even in full
>>>>> screen mode - still report the static width & height passed into
>>>>> the app.
>>>>>
>>>>> On Jul 19, 2009, at 3:09 AM, Sarah Allen wrote:
>>>>>
>>>>>> It does seem like a useful feature in case you want to use a swf
>>>>>> embedded in something that is not a browser (although I suppose
>>>>>> you could always write it yourself in code, so maybe it is not
>>>>>> worth maintaining)
>>>>>>
>>>>>> Just curious... why does it interfere with full screen mode?  I
>>>>>> would think that would happen long after canvas construct...
>>>>>>
>>>>>> On Jul 18, 2009, at 5:47 PM, Raju Bitter wrote:
>>>>>>
>>>>>>> A user in the forums ran into a problem with f
>>
>> [The entire original message is not included]
>>
>



More information about the Laszlo-dev mailing list