Comparing version 0.6.0 to 0.6.1
{ | ||
"name": "leaflet", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "JavaScript library for mobile-friendly interactive maps", | ||
"devDependencies": { | ||
"jshint": "~2.1.3", | ||
"jshint": "~2.1.4", | ||
"mocha": "~1.10.0", | ||
"karma": "~0.8.5", | ||
"karma": "~0.8.6", | ||
"uglify-js": "~2.3.6", | ||
@@ -10,0 +10,0 @@ "jake": "~0.5.16" |
@@ -73,3 +73,3 @@ /* | ||
L.DomEvent.disableClickPropagation(container); | ||
L.DomEvent.on(container, 'wheel', L.DomEvent.stopPropagation); | ||
L.DomEvent.on(container, 'mousewheel', L.DomEvent.stopPropagation); | ||
} else { | ||
@@ -76,0 +76,0 @@ L.DomEvent.on(container, 'click', L.DomEvent.stopPropagation); |
@@ -6,7 +6,2 @@ /* | ||
L.DomEvent = { | ||
WHEEL: | ||
'onwheel' in document ? 'wheel' : | ||
'onmousewheel' in document ? 'mousewheel' : | ||
'MozMousePixelScroll', | ||
/* inspired by John Resig, Dean Edwards and YUI addEvent implementations */ | ||
@@ -32,10 +27,10 @@ addListener: function (obj, type, fn, context) { // (HTMLElement, String, Function[, Object]) | ||
if (type === 'wheel' || type === 'mousewheel') { | ||
type = L.DomEvent.WHEEL; | ||
} | ||
if ('addEventListener' in obj) { | ||
if ((type === 'mouseenter') || (type === 'mouseleave')) { | ||
if (type === 'mousewheel') { | ||
obj.addEventListener('DOMMouseScroll', handler, false); | ||
obj.addEventListener(type, handler, false); | ||
} else if ((type === 'mouseenter') || (type === 'mouseleave')) { | ||
originalHandler = handler; | ||
@@ -79,6 +74,2 @@ newType = (type === 'mouseenter' ? 'mouseover' : 'mouseout'); | ||
if (type === 'wheel' || type === 'mousewheel') { | ||
type = L.DomEvent.WHEEL; | ||
} | ||
if (L.Browser.msTouch && type.indexOf('touch') === 0) { | ||
@@ -91,3 +82,7 @@ this.removeMsTouchListener(obj, type, id); | ||
if ((type === 'mouseenter') || (type === 'mouseleave')) { | ||
if (type === 'mousewheel') { | ||
obj.removeEventListener('DOMMouseScroll', handler, false); | ||
obj.removeEventListener(type, handler, false); | ||
} else if ((type === 'mouseenter') || (type === 'mouseleave')) { | ||
obj.removeEventListener((type === 'mouseenter' ? 'mouseover' : 'mouseout'), handler, false); | ||
@@ -154,12 +149,11 @@ } else { | ||
getWheelDelta: function (e) { | ||
var delta = 0; | ||
if (e.type === 'wheel') { | ||
delta = -e.deltaY / (e.deltaMode ? 1 : 120); | ||
} else if (e.type === 'mousewheel') { | ||
if (e.wheelDelta) { | ||
delta = e.wheelDelta / 120; | ||
} else if (e.type === 'MozMousePixelScroll') { | ||
delta = -e.detail; | ||
} | ||
if (e.detail) { | ||
delta = -e.detail / 3; | ||
} | ||
return delta; | ||
@@ -166,0 +160,0 @@ }, |
@@ -39,3 +39,3 @@ /* | ||
eccent = Math.sqrt(1 - (tmp * tmp)), | ||
ts = Math.exp(- point.y / r2), | ||
ts = Math.exp(- point.y / r), | ||
phi = (Math.PI / 2) - 2 * Math.atan(ts), | ||
@@ -42,0 +42,0 @@ numIter = 15, |
@@ -155,3 +155,3 @@ /* | ||
this._contentNode = L.DomUtil.create('div', prefix + '-content', wrapper); | ||
L.DomEvent.on(this._contentNode, 'wheel', L.DomEvent.stopPropagation); | ||
L.DomEvent.on(this._contentNode, 'mousewheel', L.DomEvent.stopPropagation); | ||
L.DomEvent.on(wrapper, 'contextmenu', L.DomEvent.stopPropagation); | ||
@@ -158,0 +158,0 @@ this._tipContainer = L.DomUtil.create('div', prefix + '-tip-container', container); |
@@ -5,3 +5,3 @@ | ||
L.version = '0.6'; | ||
L.version = '0.6.1'; | ||
@@ -8,0 +8,0 @@ // define Leaflet for Node module pattern loaders, including Browserify |
@@ -11,3 +11,4 @@ /* | ||
addHooks: function () { | ||
L.DomEvent.on(this._map._container, 'wheel', this._onWheelScroll, this); | ||
L.DomEvent.on(this._map._container, 'mousewheel', this._onWheelScroll, this); | ||
L.DomEvent.on(this._map._container, 'MozMousePixelScroll', L.DomEvent.preventDefault); | ||
this._delta = 0; | ||
@@ -17,3 +18,4 @@ }, | ||
removeHooks: function () { | ||
L.DomEvent.off(this._map._container, 'wheel', this._onWheelScroll); | ||
L.DomEvent.off(this._map._container, 'mousewheel', this._onWheelScroll); | ||
L.DomEvent.off(this._map._container, 'MozMousePixelScroll', L.DomEvent.preventDefault); | ||
}, | ||
@@ -20,0 +22,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
9925158
2
22229