Not approved.
DHTML:
- just calling elementFromPoint(..) isn't right, think of click or
contextmenu divs
- try calling canvas.viewFromPoint(0,0) for this test: <canvas><view
name="v1" width="100" height="100" /></canvas>, it doesn't return v1
because of the 'size_blank_to_zero' quirk
I haven't yet tested swf9+, that's wrong:
+ for (var i = sprites.length - 1; i > 0; i--) {
>= 0
and:
+ } else if (sprite instanceof TextField && sprite.parent) {
+ return sprite.parent;
sprite.parent?
/**
+ * Find a view given x/y coordinates
+ * @access public
+ */
More docs please: @param and @return
On 4/24/2010 10:36 AM, Max Carlson wrote:
Change 20100424-maxcarlson-D by maxcarl...@friendly on 2010-04-24 01:31:10 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Add API to find views by coordinate
New Features: canvas.viewFromPoint(x,y) returns the view found at a specified
point.
Bugs Fixed: LPP-8935 - Add API to find views by coordinate
Technical Reviewer: hminsky
QA Reviewer: ptw
Details: LzSprite - Add viewfrompoint capability, set to true. Add
viewfrompoint(x,y) API.
LaszloCanvas - Add viewFromPoint() API, warn if capabilities.viewfrompoint is
false.
Tests: canvas.viewFromPoint(x,y) returns the topmost view found at a specified
point.
Files:
M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
M WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
M WEB-INF/lps/lfc/views/LaszloCanvas.lzs
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20100424-maxcarlson-D.tar