# HG changeset patch # User Claus Gittinger # Date 1209996249 -7200 # Node ID 3d985b31faf28334c6bb58143b9739f62eb9054e # Parent 1043b37a4a5a9594572fb9732834a6dae4a0d7c7 targetPoitn was computed wrong for textViews (scrollOffset) diff -r 1043b37a4a5a -r 3d985b31faf2 DropContext.st --- a/DropContext.st Fri Apr 25 16:19:58 2008 +0200 +++ b/DropContext.st Mon May 05 16:04:09 2008 +0200 @@ -119,17 +119,21 @@ ! targetPoint - "returns the relative point on the target widget" + "returns the relative point on the target widget (in logical coordinates)" - |trn pnt dev| + |trn org pnt dev| dev := sourceWidget device. pnt := dev translatePoint:rootPoint from:(dev rootWindowId) to:targetId. targetWidget notNil ifTrue:[ (trn := targetWidget transformation) notNil ifTrue:[ - ^ trn applyInverseTo:pnt - ] + ^ trn applyInverseTo:pnt. + ]. + + (org := targetWidget viewOrigin) notNil ifTrue:[ + ^ pnt + org. + ]. ]. ^ pnt ! @@ -295,5 +299,5 @@ !DropContext class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview2/DropContext.st,v 1.12 2006-10-13 16:24:04 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview2/DropContext.st,v 1.13 2008-05-05 14:04:09 cg Exp $' ! !