Browse Source

Improved touch detect

Closes #792
master
Igor Zhukov 10 years ago
parent
commit
b69e5bced5
  1. 4
      app/js/lib/config.js

4
app/js/lib/config.js

@ -42,10 +42,12 @@ Config.Navigator = { @@ -42,10 +42,12 @@ Config.Navigator = {
(navigator.userAgent || '').toLowerCase().indexOf('mac') != -1,
retina: window.devicePixelRatio > 1,
ffos: navigator.userAgent.search(/mobi.+Gecko/i) != -1,
touch: screen.width <= 768,
touch: true,//screen.width <= 768 || ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,
mobile: screen.width && screen.width < 480 || navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i) != -1
};
// Touch detect: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
Config.I18n = {
locale: 'en-us',
supported: [

Loading…
Cancel
Save