Ticket #3317 (closed feature: fixed)

Opened 2 years ago

Last modified 23 months ago

sensible defaut for dragpan interval

Reported by: erilem Owned by:
Priority: major Milestone: 2.11 Release
Component: Control.DragPan Version: 2.11 RC1
Keywords: Cc:
State: Pullup

Description

The dragpan control has an interval property. Setting this property to a positive value results in moving the map every interval milliseconds as opposed to on every mousemove during dragging.

The default value for interval is 25 (milliseconds).

Experiments in various browsers, including in touch devices, show that isn't a good value.

As an example, open  http://www.openlayers.org/dev/examples/fullScreen.html in FireFox, zoom a bit to see more details, and drag the map. The map shakes. Now open the FireBug console, and do

map.controls[0].dragPan.handler.interval = 1

The map doesn't shake anymore.

Setting interval to 0 yields good results as well in most browsers, but it makes the map undraggable in the native browser of the 3G iPhone, see #3093.

So I'd suggest changing the default value from 25 to 1 in the DragPan prototype.

Having sensible default values is important, so I'd suggest to include this change in the 2.11 release.

Attachments

patch-3317-A0.diff Download (3.1 KB) - added by erilem 2 years ago.

Change History

Changed 2 years ago by erilem

Changed 2 years ago by erilem

  • state set to Review

Tests pass. Please review.

Changed 2 years ago by crschmidt

  • state changed from Review to Commit

This seems fine. Please commit.

Changed 2 years ago by erilem

  • state changed from Commit to Pullup

Changed 23 months ago by fredj

Changed 23 months ago by ahocevar

  • status changed from new to closed
  • resolution set to fixed

in 2.11-rc2

Note: See TracTickets for help on using tickets.