OpenLayers OpenLayers

Ticket #1356 (closed task: fixed)

Opened 10 months ago

Last modified 9 months ago

tweenClass, tweenOptions settings on map

Reported by: crschmidt Assigned to:
Priority: minor Milestone: 2.6 Release
Component: Map Version: 2.5
Keywords: Cc:
State: Complete

Description

We currently tween the map on panning, but offer no control over how we do it. Rather than scatter options throughout many different functions, we should investigate having a map-level option for controlling the tweening and options to tweening.

I think that most important for the 2.6 release is just a way to turn it *off*, since there are cases where it doesn't make sense for an application: this could be done by setting a tween/tweenClass option to 'null', which would change panTo to just call setCenter instead.

I think not having a way to turn off tweening is a blocker for 2.6: I didn't feel this way until recently, when I started working with large vector datasets, where tweening the pans via the pan button don't make sense.

Attachments

easingfunc.patch (3.0 kB) - added by crschmidt on 02/28/08 18:37:49.
animationFunction.patch (3.0 kB) - added by crschmidt on 02/28/08 18:46:23.
better name
panAnimator.patch (3.0 kB) - added by tschaub on 02/29/08 00:20:13.
new name again, and consistency in the example
panmethod.patch (3.0 kB) - added by crschmidt on 02/29/08 00:41:02.
panmethod.2.patch (3.0 kB) - added by crschmidt on 02/29/08 00:50:46.
fix doc description

Change History

02/28/08 18:37:49 changed by crschmidt

  • attachment easingfunc.patch added.

02/28/08 18:38:42 changed by crschmidt

  • state set to Review.

Function changes map behavior if and only if map.easingFunction is set to something other than the default, in which case it will use that as an easing function, or if it is null, it will not use animated panning. Includes updated example with small amount of documentation.

02/28/08 18:46:23 changed by crschmidt

  • attachment animationFunction.patch added.

better name

02/28/08 18:46:38 changed by crschmidt

Rename, at Erik's suggestion

02/29/08 00:20:13 changed by tschaub

  • attachment panAnimator.patch added.

new name again, and consistency in the example

02/29/08 00:23:16 changed by tschaub

I agree this is a good idea. One minor issue with the animationFunction patch is that the example doesn't work since it still uses the old name.

I also think it makes sense to leave room for a day when we animate more than panning (zooming anyone?). The name animationFunction is a bit too unspecific. How about panAnimator (leaving room for zoomAnimator)? Not my favorite names, but a bit more forward looking.

If the new name is too unsavory, please at least update the example with the chosen name.

02/29/08 00:24:16 changed by tschaub

Or even panMethod. Actually, I think I like that best.

02/29/08 00:37:39 changed by crschmidt

  • state changed from Review to Needs More Work.

I couldn't decide if it was likely we'd want two different easings for the different animation methods, or if we'd always want one to be used for both. If it's the former, then you're right, I should change the name (and the example).

02/29/08 00:41:02 changed by crschmidt

  • attachment panmethod.patch added.

02/29/08 00:41:22 changed by crschmidt

  • state changed from Needs More Work to Review.

Done.

02/29/08 00:49:35 changed by tschaub

  • state changed from Review to Commit.

Cool. Please commit with one additional change: the example still mentions easingFunction. This should be panMethod.

02/29/08 00:50:46 changed by crschmidt

  • attachment panmethod.2.patch added.

fix doc description

02/29/08 01:03:13 changed by crschmidt

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [6411]) panmethod option on map to allow for the turning off of animated panning. Includes example. All tests pass. r=tschaub. (Closes #1356)