Add msTouch detection
This commit is contained in:
parent
67d1f6e1c5
commit
b93e04abe7
@ -14,11 +14,18 @@
|
||||
ie3d = ie && ('transition' in doc.style),
|
||||
webkit3d = webkit && ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()),
|
||||
gecko3d = gecko && ('MozPerspective' in doc.style),
|
||||
opera3d = opera && ('OTransition' in doc.style);
|
||||
opera3d = opera && ('OTransition' in doc.style),
|
||||
|
||||
msTouch = (window.navigator && window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints);
|
||||
|
||||
var touch = !window.L_NO_TOUCH && (function () {
|
||||
var startName = 'ontouchstart';
|
||||
|
||||
// IE10+ (We simulate these into touch* events in L.DomEvent and L.DomEvent.MsTouch)
|
||||
if (msTouch) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// WebKit, etc
|
||||
if (startName in doc) {
|
||||
return true;
|
||||
@ -69,6 +76,7 @@
|
||||
mobileOpera: mobile && opera,
|
||||
|
||||
touch: touch,
|
||||
msTouch: msTouch,
|
||||
|
||||
retina: retina
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user