Created a JIRA issue: http://jira.openlaszlo.org/jira/browse/LPP-9995

On Wed, Jul 13, 2011 at 3:55 PM, Raju Bitter
<[email protected]> wrote:
> When I make a call to view.getDisplayObject() in the DHTML and mobile
> runtime, the call returns the LzSprite.__LZdiv object. Is that the
> expected behavior, or should it not return the view.sprite instance?
>
> Given the following code:
> <canvas debug="true">
>
>    <view name="y1" x="200" y="10" width="100" height="100" bgcolor="yellow">
>
>    </view>
>
>    <button text="y1.getDisplayObject()" onclick="Debug.info(
> y1.getDisplayObject() )" />
>    <button y="30" text="y1.sprite" onclick="Debug.info( y1.sprite )" />
>
> </canvas>
>
> Debug.info( y1.getDisplayObject() ) gives me:
> INFO: «HTMLDivElement#0|
> #y1/@sprite/@__LZdiv/div.lzdiv[@style="background-color: rgb(255, 255,
> 0); height: 100px; width: 100px; left: 200px; top: 10px; z-index:
> 4;"]»
>
> And Debug.info( y1.sprite ) gives me:
> INFO: «LzSprite#3| #y1/@sprite [100 x 100]*[1 0 200, 0 1 10, 0 0 1]»
>
> Here are my questions:
> 1) What is the additional div __LZdiv used for?
> 2) If I want to add HTML objects created through JavaScript to a view,
> should I attach them to the sprite, or to the __LZdiv instance?
>

Reply via email to