Community
Participate
Working Groups
We currently animate for: go to line, find, find incremental, jump to function from outline We don't animate for: page up, page down, go to top, go to bottom I'd like to have the editor animate all these cases, which probably means pushing that functionality down to the widget level. I guess it should be made an option for those who like ultimate performance and don't care about intermediate states that help the eye understand what's happening.
(In reply to comment #0) > We don't animate for: page up, page down, go to top, go to bottom Animating for those feels really strange to me... I don't know if I've ever seen a UI do that. So if I'm at the top of a file with thousands of lines, and hit "End", it would animate scrolling past those thousands of lines (and therefore paint all of them)??
It would use 300ms (or whatever time we allocate for animation, I believe 300ms is the current value) to animate intermediate states.
Safari does it, for example.
the Editor API allows the application to override any action performed by the editor. See Editor#setAction(). You can implemented that on the top of the editor. Aninations to looks sharp need an ease in/ease out function among other things. Personally I would not like to push this code down in the editor (as I don't want to implement animaton routines nor I would like to depend on dojo). I can, however, help on the application side to help you implement this feature.
The animation done by editor has been moved to text view. These are the APIs that have been modified or added to support it. All changes in API are backwards compatible. - scrollAnimation option (the duration of that scroll animation. 0 by default) - setCaretOffset and setSelection take a new callback parameter. If the callback is specified and scrollAnimation is enable (not zero), any scrolling necessary is animated. Callback is called when the animation is done. - setCaretOffset and setSelection: the show parameter has been extended to also allow alignment of the caret in positions other than the topIndex and bottomIndex. - when animation is enable it affects these actions: pageDown, pageUp, textStart, textEnd, selectPageDown, selectPageUp, selectTextStart, selectTextEnd. See the jsdoc for more info. Fixed http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=9e2eb7cba595f19fbdd4dee90d11facc92d8bf2c