Ticket #2376 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

mouse wheeling results in fractional zoom levels

Reported by: tschaub Owned by:
Priority: minor Milestone: 2.9 Release
Component: Control.Navigation Version: 2.8
Keywords: Cc:
State: Complete

Description

Since r9799, you can unintentionally get fractional zoom levels using the mouse wheel. The easiest way to see this problem is to add a console.log(deltaZ) line to the wheelChange method in the Navigation control (line 213). Alternately, open up an example and use the mouse wheel to zoom just a little bit. Try map.zoom in the console to see numbers like 1.6666666.

The wheelChange method expects an integer deltaZ. The onWheelEvent method in the MousWheel handler does e.detail / 3. I don't see anything that says what to expect for values in the  docs, but I see integer values for detail in FF3.x.

Attachments

2376.patch Download (0.6 KB) - added by tschaub 3 years ago.
zoom by integer values

Change History

Changed 3 years ago by tschaub

zoom by integer values

Changed 3 years ago by tschaub

  • state set to Review

Navigation control tests continue to pass. Examples like the google one work again.

Thanks for any review.

Changed 3 years ago by bartvde

  • state changed from Review to Commit

Tim, this makes sense to me. Please commit.

Changed 3 years ago by tschaub

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

(In [9876]) Only zoom by integer values with changes in the mouse wheel. r=bartvde (closes #2376)

Note: See TracTickets for help on using tickets.