Ticket #2345 (closed feature: fixed)

Opened 4 years ago

Last modified 4 years ago

add option to the MouseWheel handler to trigger up/down events only when wheel is released

Reported by: ahocevar Owned by:
Priority: minor Milestone: 2.9 Release
Component: Handler.MouseWheel Version: 2.8
Keywords: Cc:
State: Complete

Description

Currently, wheel-zooming a map causes lots of tile requests to be sent to the server. Although these requests are aborted when zooming to a new zoom level, this causes a huge server load for servers that receive the abort during rendering.

The proposed patch adds an interval option to the MouseWheel handler. When set to a number (milliseconds) other than 0, the handler will cumulate the wheel delta until the wheel is released, and then zoom to the according zoom level when the interval is expired.

Tests pass and example works in FF3 and IE8. Thanks for any review.

Attachments

openlayers-2345.patch Download (8.4 KB) - added by ahocevar 4 years ago.

Change History

Changed 4 years ago by ahocevar

Changed 4 years ago by elemoine

  • state changed from Review to Commit

Patch looks good to me. Please commit.

Changed 4 years ago by ahocevar

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

(In [9799]) added option to the MouseWheel handler to trigger up/down events only when wheel is released. r=elemoine (closes #2345)

Note: See TracTickets for help on using tickets.