Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Oscar Morales Vivó <email@hidden>
- Date: Sat, 24 Aug 2002 09:59:31 +0200
You might be getting the coordinates of the view you are scrolling,
which means that
1) you move the mouse
2) the view moves under the mouse, possibly generating another mouse
moved event.
You should try getting the coordinates relative to the containing view.
Hope that helps.
At least it sounds like a problem I had myself, which was solved this
way.
On Saturday, August 24, 2002, at 02:17 , Joshua D. Orr wrote:
I am trying to implement a hand which scrolls the view by dragging in
the NSView.
in the mouseDown: NEView methods I have a dragging loop which reads
the difference between the last and the new mouse location while
dragging and then uses the ([self bounds]).origin and adds the
difference point and the bounds origin and the uses [self
scrollPoint:] with the new location.
This seems to sort of work, because it does scroll around, but it is
kind of a little weird. It is almost like it accelerates the way you
are dragging but when you go the other way it slows down then it
finally starts going the other way, it is almost like it has
momentum :). This is interesting but un desirable.
Does anyone have any suggestions?
-Joshua D. Orr-
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >(no subject) (From: "Joshua D. Orr" <email@hidden>) |