[Laszlo-user] Mouse events on a stretched view

P T Withington ptw at pobox.com
Thu Jan 24 06:25:10 PST 2008


I'm looking at this. There are too many undocumented literal constants  
in this code!  All these 100's, which are magically applied...

On Jan 23, 2008, at 21:46, "Henry Minsky" <henry.minsky at gmail.com>  
wrote:

> Adding a mouse event causes the view to be clickable, which in turn  
> attaches some
> special movieclip to catch clicks, so that would be one thing that  
> changes. Maybe that
> view is not being properly scaled with the other views.
>
>
>
> On Jan 22, 2008 10:05 PM, Pablo Kang <pkang at laszlosystems.com> wrote:
> More weirdness. If I add a subview to a stretched view, I get  
> different results
> on how that subview is displayed depending on whether a mouse event  
> is defined
> or not. Can anyone explain what's happening here?
>
> <canvas debug="true">
>
>     <simplelayout axis="x" spacing="10"/>
>
>     <!-- Mouse over event -->
>     <view height="400" width="100" stretches="height"
>           bgcolor="silver"
>           onmouseover="Debug.write('mouseover')">
>         <view height="1" width="100" bgcolor="green"/>
>     </view>
>
>     <view height="400" width="100" stretches="height"
>           bgcolor="silver"
>           onmouseover="Debug.write('mouseover')">
>         <view height="2" width="100" bgcolor="red"/>
>     </view>
>
>     <!-- No mouse over event -->
>     <view height="400" width="100" stretches="height"
>           bgcolor="silver">
>         <view height="1" width="100" bgcolor="green"/>
>     </view>
>
>     <view height="400" width="100" stretches="height"
>           bgcolor="silver">
>         <view height="2" width="100" bgcolor="red"/>
>     </view>
>
> </canvas>
>
>
> On Tue, 22 Jan 2008, Pablo Kang wrote:
>
> > Mouse events are only available for the first 100 pixels of a  
> stretched view.
> > Test case:
> >
> > <canvas debug="true">
> >
> >    <!-- Mouse events only over first 100 pixels of gray rectangle;  
> green bar
> >         represents 100 pixels. -->
> >    <view height="400" width="100" stretches="height"
> >          bgcolor="silver"
> >          onclick="Debug.write('click')"
> >          onmouseover="Debug.write('mouseover')"
> >          onmouseout="Debug.write('mouseout')" />
> >
> >    <!-- Bar representing 100 pixels -->
> >    <view x="110" height="100" width="10" bgcolor="green" />
> >
> > </canvas>
> >
> >
> > Ideas?
> >
> > pablo
> >
> >
> >
> >
> >
>
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20080124/53c6f1f4/attachment.html


More information about the Laszlo-user mailing list