[Laszlo-dev] For Review: Change 20090219-maxcarlson-g Summary: Correct mouse position for invisible views in DHTML

André Bargull andre.bargull at udo.edu
Thu Feb 19 06:17:24 PST 2009


In "__processHiddenParents", the supplied method is called within the 
context of the sprite (`method.apply(this, args)`), but in 
"lz.embed.getAbsolutePosition" there is this code: 
`this.hasOwnProperty('getStyle')`.

1) LzSprite hasn't got a "getStyle" function, so that if-condition will 
never be true
2) but also, if "lz.embed.getAbsolutePosition(..)" is called, the `this` 
context is "lz.embed", but there is no "getStyle" function in 
"lz.embed", too. This leads to the question: What was intended at that 
point? Maybe `window.hasOwnProperty('getStyle')`?


On 2/19/2009 2:56 PM, Max Carlson wrote:
> Change 20090219-maxcarlson-g by maxcarlson at Bank.local on 2009-02-19 
> 05:47:11 PST
>     in /Users/maxcarlson/openlaszlo/trunk-clean
>     for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: Correct mouse position for invisible views in DHTML
> 
> Bugs Fixed: LPP-7688 - dragstate doesn't behave the same in DHTML as swf8
> 
> Technical Reviewer: andre.bargull at udo.edu
> QA Reviewer: promanik
> 
> Details: Add comment for init().  Move logic for finding/showing/hiding 
> hidden parents to __processHiddenParents().  Use 
> __processHiddenParents() for invisible_parent_image_sizing_fix quirk and 
> in __getPos() for determining sprite position - used by getMouse().  Fix 
> position caching in __getPos().
> 
> Tests: Testcase from LPP-4357 runs as before in firefox.  Testcase from 
> LPP-7688 is fixed.  Firebug only shows one call to getAbsolutePosition() 
> per drag event - this method can be expensive in some browsers, hence 
> the caching.
> 
> Files:
> M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
> 
> Changeset: 
> http://svn.openlaszlo.org/openlaszlo/patches/20090219-maxcarlson-g.tar
> 


More information about the Laszlo-dev mailing list