*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Wed, 10 May 2000 11:41:00 +0200
changeset 2189 dfbbe49ef316
parent 2188 ef616e3ac785
child 2190 e342c52a1ac8
*** empty log message ***
Scroller.st
--- a/Scroller.st	Mon May 08 11:46:54 2000 +0200
+++ b/Scroller.st	Wed May 10 11:41:00 2000 +0200
@@ -1417,26 +1417,32 @@
 
     |pos curr curr2 limit1 limit2|
 
+    thumbFrame isNil ifTrue:[
+        self computeThumbFrame.
+        thumbFrame isNil ifTrue:[
+            ^ self.
+        ]
+    ].
     (orientation == #vertical) ifTrue:[
-	curr := y.
-	curr2 := y - (thumbFrame height // 2).
-	limit1 := height.
-	limit2 := thumbFrame top
+        curr := y.
+        curr2 := y - (thumbFrame height // 2).
+        limit1 := height.
+        limit2 := thumbFrame top
     ] ifFalse:[
-	curr := x.
-	curr2 := x - (thumbFrame width // 2).
-	limit1 := width.
-	limit2 := thumbFrame left
+        curr := x.
+        curr2 := x - (thumbFrame width // 2).
+        limit1 := width.
+        limit2 := thumbFrame left
     ].
 
     (curr2 < 0) ifTrue:[                        "check against limits"
-	pos := 0
+        pos := 0
     ] ifFalse:[
-	(curr2 > limit1) ifTrue:[
-	    pos := limit1
-	] ifFalse:[
-	    pos := curr2
-	]
+        (curr2 > limit1) ifTrue:[
+            pos := limit1
+        ] ifFalse:[
+            pos := curr2
+        ]
     ].
 
     self startMove.
@@ -1445,9 +1451,9 @@
     self tellOthers.
 
     (orientation == #vertical) ifTrue:[
-	limit2 := thumbFrame top
+        limit2 := thumbFrame top
     ] ifFalse:[
-	limit2 := thumbFrame left
+        limit2 := thumbFrame left
     ].
     pressOffset := curr - limit2.
     scrolling := true.
@@ -2443,5 +2449,5 @@
 !Scroller class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.145 2000-04-03 16:35:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Scroller.st,v 1.146 2000-05-10 09:41:00 cg Exp $'
 ! !