Set mouse position as part of wheel events.
MODIFY
CHANGELOG.md
CHANGELOG.md
### Improvements
- Points with small radii or thin strokes are rendered better (#1021)
+### Bug Fixes
+- Mouse wheel events didn't recompute gcs coordinates, so a wheel event without a previous move event coult list the wrong location (#1027)
+
## Version 0.19.6
### Features

MODIFY
src/mapInteractor.js
src/mapInteractor.js
@@ -816,6 +816,9 @@ var mapInteractor = function (args) {
* @param {jQuery.Event} evt JQuery event with the mouse position.
*/
this._getMousePosition = function (evt) {
+ if (evt.pageX === undefined || evt.pageY === undefined) {
+ return;
+ }
var offset = $node.offset(), dt, t;
t = (new Date()).valueOf();
@@ -849,6 +852,9 @@ var mapInteractor = function (args) {
* @param {jQuery.Event} evt The event that trigger the mouse action.
*/
this._getMouseButton = function (evt) {
+ if (evt.buttons === undefined && evt.which === undefined) {
+ return;
+ }
for (var prop in m_mouse.buttons) {
if (m_mouse.buttons.hasOwnProperty(prop)) {
m_mouse.buttons[prop] = false;
@@ -1725,6 +1731,8 @@ var mapInteractor = function (args) {
}
// perform the map navigation event
+ m_this._getMousePosition(evt);
+ m_this._getMouseButton(evt);
m_this._getMouseModifiers(evt);
actionRecord = actionMatch({wheel: true}, m_mouse.modifiers,

Set mouse position as part of wheel events.