Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006973 [Squeak] Morphic feature N/A 03-07-08 00:32 03-07-08 01:17
Reporter wiz View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version
Summary 0006973: [Enh] better MouseMoveEvent interaction with a targetPoint
Description Context: When dragged by the mouse a target wishes to be moved but must remain within certain constraints. (for example the bounds of its owner.)

The problem: currently this is done by trying to having the target track the LOCATION of the cursor as the mouse moves. This means that if the constraint is reached the target will not track the cursor until the cursor returns within the contraints.

The solution: Have the target track the MOTION of the cursor, then apply the constraint.

The difference: the target responds immediately to new movements and seems to move freely and responsively (within its constraints) as the mouse moves.
Additional Information Uploaded are


enhancements to MouseMoveEvent to add vocabulary to aid motion tracking.

Attached Files  MouseMoveEnh-wiz.4.cs [^] (8,784 bytes) 03-07-08 00:32

- Relationships

SYSTEM WARNING: Creating default object from empty value

SYSTEM WARNING: Creating default object from empty value

related to 0002406closed tim Set cursor position primitive does not work and has not in some time. 
related to 0006594new  [Fix] [Enh] A better way to handle Balloon-Fill adjustments 
related to 0006975new  [RFE] Better event distictions between drag, click and mouse up. 

- Notes
(0011910 - 1521 - 1663 - 1663 - 1783 - 1783 - 1783)
03-07-08 01:17

From an off topic thread in 0002406 Bert wrote:

>Could you add a small morphic example demonstrating this? I can't quite imagine what you're trying to accomplish.

>I downloaded as suggested in 0006594 but could not find a #hasMoved method, or deltaVectors etc.

Ok. The point of the ramp and fill handles was to demonstrate the difference between the motion tracking and what squeak usually does which is cursor position tracking. A lot else is going on in those examples, but it does demonstrate the abiltity to move the target along a constrained track and to keep moving it even as the cursor and target get out of sync.

What I was trying for was that the target becomes the "cursor". Squeaks hand maintains a targetOffset but unless that is updated constantly it stops working as targets reach their constraints.
So rather than updating target offsets
1) let the target supply the initial position fresh each move and
2) let the event then return how that targetpoint would be moved. Then
3) apply the constraints to the moved-point and
4) reposition the target accordingly.


the method
#hasMoved is in the cs for completeness. MouseMoveEvents are generated frequently for timing and pacing reasons so often the events do not represent a real mouse move.

The #deltaVector method is the result of the first attempt at these changes. Further iterations made me settle on #moveAndTug: tagretpoint. I probably use that most often in my coding projects.

- Issue History
Date Modified Username Field Change
03-07-08 00:32 wiz New Issue
03-07-08 00:32 wiz File Added: MouseMoveEnh-wiz.4.cs
03-07-08 00:33 wiz Relationship added related to 0002406
03-07-08 00:35 wiz Relationship added related to 0006594
03-07-08 01:17 wiz Note Added: 0011910
03-18-08 00:12 wiz Relationship added related to 0006975

Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
47 total queries executed.
33 unique queries executed.
Powered by Mantis Bugtracker