selection/multiSelection/startDrag
authorClaus Gittinger <cg@exept.de>
Mon, 28 Feb 2005 15:29:45 +0100
changeset 3132 7cbaaa576f28
parent 3131 8f21dba07d24
child 3133 c7095bea4b6d
selection/multiSelection/startDrag algorithm changed. Can now click-and-drag.
SelectionInListView.st
--- a/SelectionInListView.st	Fri Feb 25 14:32:15 2005 +0100
+++ b/SelectionInListView.st	Mon Feb 28 15:29:45 2005 +0100
@@ -2206,7 +2206,7 @@
     clickLine isNil ifTrue:[^ self].
 
     (self canDrag and:[clickPosition notNil]) ifTrue:[     "mouse pressed but not released"
-        (clickPosition dist:(x@y)) > 5.0 ifTrue:[
+        (clickPosition dist:(x@y)) > 10.0 ifTrue:[
             ^ self startDragAt:clickPosition
         ].
         ^ self
@@ -2224,7 +2224,8 @@
         ^ self
     ].
 
-    (self canDrag and:[x < -5]) ifTrue:[           "visible and left out of view"
+    (self canDrag 
+    and:[x < -5 or:[x > (width+5)]]) ifTrue:[           "visible and out of view"
         ^ self startDragAt:(0 @ y)
     ].
 
@@ -3980,5 +3981,5 @@
 !SelectionInListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.226 2005-02-14 16:07:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.227 2005-02-28 14:29:45 cg Exp $'
 ! !