Living happily together

Jon Hylands jon at huv.com
Mon Jul 9 14:29:39 UTC 2001


On Sun, 8 Jul 2001 10:09:23 -0700, "Jim Benson" <jb at speed.net> wrote:

> Click on morph to 'raise' : ( on a large morph nothing appears to happen for
> a beat so user doesn't release mouse button immediately)
> Hand caches morph and draws shadow around morph
> User sees something has happened and releases the mouse button.
> (  depending on a lot of factors, sometimes the mouse has moved before the
> button has been released )
> The morph is redrawn in the world ( without shadow ).

Every GUI frameworks in the world has this problem... The way that it is
solved is by introducing a "slop rectangle", which is an area of about 3-4
pixels around where you click the mouse, where moving the mouse doesn't
start a drag operation.

Once you go outside the slop rectangle (while the mouse button is down),
you need to compensate for the amount the mouse moved while you were inside
the slop rectangle.

If you use an FSM for dragging, its almost trivial to add this...

Later,
Jon

--------------------------------------------------------------
   Jon Hylands      Jon at huv.com      http://www.huv.com/jon

  Project: Micro Seeker (Micro Autonomous Underwater Vehicle)
           http://www.huv.com





More information about the Squeak-dev mailing list