Преглед изворни кода

Revert "IE11"

This reverts commit bbbd8179424aa4a619ea20c834fb22459997e240.
InuYaksa пре 10 година
родитељ
комит
7c85c362ea
1 измењених фајлова са 6 додато и 23 уклоњено
  1. 6 23
      jquery.nicescroll.js

+ 6 - 23
jquery.nicescroll.js

@@ -34,13 +34,14 @@
     var path=scripts[scripts.length-1].src.split('?')[0];
     return (path.split('/').length>0) ? path.split('/').slice(0,-1).join('/')+'/' : '';
   }
+//  var scriptpath = getScriptPath();
   
   var vendors = ['ms','moz','webkit','o'];
   
   var setAnimationFrame = window.requestAnimationFrame||false;
   var clearAnimationFrame = window.cancelAnimationFrame||false;
 
-  if (!setAnimationFrame) {  // legacy detection
+  if (!setAnimationFrame) {
     for(var vx in vendors) {
       var v = vendors[vx];
       if (!setAnimationFrame) setAnimationFrame = window[v+'RequestAnimationFrame'];
@@ -123,8 +124,7 @@
     d.isie7 = d.isie&&!d.isieold&&(!("documentMode" in document)||(document.documentMode==7));
     d.isie8 = d.isie&&("documentMode" in document)&&(document.documentMode==8);
     d.isie9 = d.isie&&("performance" in window)&&(document.documentMode>=9);
-    d.isie10 = d.isie&&("performance" in window)&&(document.documentMode>=10);   // IE10 only
-    d.isie11 = ("msRequestFullscreen" in domtest)&&(document.documentMode>=11);  // attachEvent deprecated on IE11
+    d.isie10 = d.isie&&("performance" in window)&&(document.documentMode>=10);
     
     d.isie9mobile = /iemobile.9/i.test(navigator.userAgent);  //wp 7.1 mango
     if (d.isie9mobile) d.isie9 = false;
@@ -139,14 +139,12 @@
     d.ischrome26 = (d.ischrome&&("transition" in domtest.style));  // issue with transform detection (maintain prefix)
     
     d.cantouch = ("ontouchstart" in document.documentElement)||("ontouchstart" in window);  // detection for Chrome Touch Emulation
-    d.hasmstouch = (window.MSPointerEvent||false);  // IE10 pointer events
-    d.hasw3ctouch = (window.PointerEvent||false); //IE11 pointer events, following W3C Pointer Events spec
+    d.hasmstouch = (window.navigator.msPointerEnabled||false);  // IE10+ pointer events
 		
     d.ismac = /^mac$/i.test(navigator.platform);
     
     d.isios = (d.cantouch && /iphone|ipad|ipod/i.test(navigator.platform));
     d.isios4 = ((d.isios)&&!("seal" in Object));
-    d.isios7 = ((d.isios)&&("webkitHidden" in document));
     
     d.isandroid = (/android/i.test(navigator.userAgent));
     
@@ -184,7 +182,7 @@
         break;
       }
     }
-    if (d.ischrome26) {  // always use prefix
+    if (d.ischrome26) {  // use always prefix
       d.prefixstyle = prefix[1];
     }
     
@@ -1285,11 +1283,6 @@
             if (self.rail.drag) {
               if(self.rail.drag.pt!=1)return;
               
-              if (!self.rail.visibility && !self.railh.visibility) {
-                self.rail.drag = false;
-                return;
-              }
-              
               if (cap.ischrome&&e.which==0) return self.onmouseup(e);
               
               self.cursorfreezed = true;
@@ -1406,16 +1399,7 @@
             
           }
           
-
-          if(cap.hasw3ctouch) {
-            self.css(self.rail,{'touch-action':'none'});
-            self.css(self.cursor,{'touch-action':'none'});
-
-            self.bind(self.win,"pointerdown",self.ontouchstart);
-            self.bind(document,"pointerup",self.ontouchend);
-            self.bind(document,"pointermove",self.ontouchmove);
-          }
-          else if (cap.hasmstouch) {
+          if (cap.hasmstouch) {
             self.css(self.rail,{'-ms-touch-action':'none'});
             self.css(self.cursor,{'-ms-touch-action':'none'});
             
@@ -1426,7 +1410,6 @@
             self.bind(self.cursor,"contextmenu",function(e){e.preventDefault()});
           }
 
-
           if (this.istouchcapable) {  //desktop with screen touch enabled
             self.bind(self.win,"touchstart",self.ontouchstart);
             self.bind(document,"touchend",self.ontouchend);