On Wed, 7 Dec 2005, Oliver Steele wrote:
> [snipped]
> The workaround is this, which manually implements event bubbling for onclick
> through means of a "trampoline handler" on B.
> <view name="A" width="200" height="200" onclick="Debug.write('click')"
> bgcolor="blue">
> <view name="B" width="100" height="100" onmouseover="Debug.write('over')"
> bgcolor="green">
> <method event="onclick" args="sd">
> immediateparent.onclick.sendEvent(sd);
> </method>
> </view>
> </view>
Hm. The problem I was seeing is this...
<canvas>
<view name="A" height="100" width="100" bgcolor="blue"
onmouseover="Debug.write('over A')" onmouseout="Debug.write('out A')">
<simplelayout axis="y" spacing="5"/>
<view height="20" width="20" name="B" bgcolor="red"
onclick="Debug.write('click B')"/>
<view height="20" width="20" name="C" bgcolor="red"
onclick="Debug.write('click C')"/>
<view height="20" width="20" name="D" bgcolor="red"
onclick="Debug.write('click D')"/>
</view>
</canvas>
Mouse around the red squares. Notice that A reports mouseouts every time.
This is bad because I want to kick off an animator to do something with
view A when you mouse is out of it... what I ended up with, of course,
was a big stack of animators executing.
I guess I can, in A's onmouseout, check if the mouse is in A's bounding
box...
gse
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user