History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-2731
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: -- --
Assignee: Mamye Kratt
Reporter: Chris Hancock
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

getMouse fails to account for xoffset and yoffset

Created: 21/Sep/06 01:20 PM   Updated: 27/Sep/07 08:56 AM
Component/s: Laszlo Foundation Classes (LFC)
Affects Version/s: 3.3.3
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

File Attachments: 1. File dragoff2.lzx (1 kb)
2. File dragoff3.lzx (1 kb)


Severity: Minor
Fixed in Change#: 5,212
Fixed in branch: branches/legals
Runtime: N/A
Fix in hand: True


 Description  « Hide
getMouse is supposed to return mouse position in the current view's coordinate system. When the coordinate system is shifted by xoffset/yoffset, getMouse fails to take this shift into account. This is, I believe, the problem underlying the malfunction of the standard dragger for views that have an offset. For example, in the attached program, the red view jumps everytime you drag it. On the other hand, the blue view drags correctly, because its dragger gets the relative mouse position using a function getRelMouse, which subtracts xoffset/yoffset. I claim that the standard getMouse function should be doing what this getRelMouse function does.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Chris Hancock - 21/Sep/06 06:24 PM
Sorry for the erroneous analysis, Having got my head a little further around the relationship between offsets and coordinate systems, I guess the problem is not with getMouse, but just an assumption in the default dragstate class. If I could, I would rename this issue: "Make default dragger handle views with offsets." I think the default dragstate ought to do something like what the custom one does in the enclosed file dragoff3.lzx.

Max Carlson - 24/May/07 01:20 PM
Fixed for legals/4.0.

Mamye Kratt - 06/Jul/07 02:34 PM
(4.0 branch (4.0.3) build r5599)
Closing for 4.0.3

Mamye Kratt - 06/Jul/07 02:35 PM
Need to test in legals.

Mamye Kratt - 17/Jul/07 12:21 PM
Need to test in legals.