mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 19:23:55 +00:00
isTouchDevice
This commit is contained in:
parent
9ba6d627e7
commit
800b8f5eaa
1 changed files with 7 additions and 1 deletions
|
|
@ -29,6 +29,11 @@ function flatten (arr) {
|
|||
return [].concat.apply([], arr)
|
||||
}
|
||||
|
||||
function isTouchDevice () {
|
||||
return 'ontouchstart' in window || // works on most browsers
|
||||
navigator.maxTouchPoints // works on IE10/11 and Surface
|
||||
};
|
||||
|
||||
/**
|
||||
* `querySelectorAll` that returns a normal array instead of fileList
|
||||
*/
|
||||
|
|
@ -181,5 +186,6 @@ export default {
|
|||
extend,
|
||||
readImage,
|
||||
resizeImage,
|
||||
getProportionalImageHeight
|
||||
getProportionalImageHeight,
|
||||
isTouchDevice
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue