Browse Source

3.7.4

Fixes
- touchpad scrolling support for MS Surface aka FYI - Browser test
results on Surface Pro touchscreen and touchpad #668
- changed scrollbarid setting procedure because uglify mades
uncompatible code for IE8 aka use nicescroll in IE8 #672
- preserve scrol chain
- page scrollbar not customized on android
- prevent bar flickering when window not changed aka Using this plugin I
got a flickering scroll bar #674

Changes
- more responsive direct scrolling from bars
- more consistence scrolling speed on many browsers (Chrome, Firefox,
Edge)
- minor code optimizations and jshint check
- jQuery "bind" event function changed to "on", migration to jQuery 3
(still jQuery 1 compatible) #361
- Using jQuery.expr.pseudos, migration to jQuery 3 (still jQuery 1
compatible) #361
- changed arguments for doScrollBy and doScrollLeftBy
InuYaksa 7 years ago
parent
commit
ce34b1f38a

+ 7 - 5
README.md

@@ -1,5 +1,7 @@
 # jQuery.NiceScroll
-v. 3.7.3 2017-06-18
+v. 3.7.4
+
+## The best nicescroll release ever - extremely smooth and consistent in modern browsers and mobile devices, with low resource usage
 
  - [Web Site: nicescroll.areaaperta.com](https://nicescroll.areaaperta.com)
  - [Repo: github.com/inuyaksa/jquery.nicescroll](https://github.com/inuyaksa/jquery.nicescroll)
@@ -74,23 +76,23 @@ When you use zoom feature, copy image "zoomico.png" in the same folder of jquery
 Initialize nicescroll ALWAYS in (document) ready statement.
 ```javascript
 // 1. Simple mode, it styles document scrollbar:
-$(document).ready(function() {  
+$(function() {  
     $("html").niceScroll();
 });
 
 // 2. Instance with object returned:
 var nice = false;
-$(document).ready(function() {  
+$(function() {  
     nice = $("html").niceScroll();
 });
 
 // 3. Style a DIV and chage cursor color:
-$(document).ready(function() {  
+$(function() {  
     $("#thisdiv").niceScroll({cursorcolor:"#00F"});
 });
 
 // 4. DIV with "wrapper", formed by two divs, the first is the vieport, the latter is the content:
-$(document).ready(function() {
+$(function() {
     $("#viewportdiv").niceScroll("#wrapperdiv",{cursorcolor:"#00F"});
 });
 

+ 0 - 12
changelog_3.7.3.txt

@@ -1,12 +0,0 @@
-Changelog nicescroll release 3.7.3
-https://nicescroll.areaaperta.com/
-https://github.com/inuyaksa/jquery.nicescroll
-
-
-
-Fixes
-- onscrollstart error on emulatetouch
-
-
-Changes 
-- a little size optimization for uglufy version

+ 20 - 0
changelog_3.7.4.txt

@@ -0,0 +1,20 @@
+Changelog nicescroll release 3.7.4
+https://nicescroll.areaaperta.com/
+https://github.com/inuyaksa/jquery.nicescroll
+
+
+
+Fixes
+- touchpad scrolling support for MS Surface aka FYI - Browser test results on Surface Pro touchscreen and touchpad #668
+- changed scrollbarid setting procedure because uglify mades uncompatible code for IE8 aka use nicescroll in IE8 #672
+- preserve scrol chain
+- page scrollbar not customized on android
+- prevent bar flickering when window not changed aka Using this plugin I got a flickering scroll bar #674
+
+Changes 
+- more responsive direct scrolling from bars
+- more consistence scrolling speed on many browsers (Chrome, Firefox, Edge)
+- minor code optimizations and jshint check
+- jQuery "bind" event function changed to "on", migration to jQuery 3 (still jQuery 1 compatible) #361
+- Using jQuery.expr.pseudos, migration to jQuery 3 (still jQuery 1 compatible) #361
+- changed arguments for doScrollBy and doScrollLeftBy

+ 4 - 4
demo/browser.html

@@ -24,17 +24,17 @@ body {
 }
 </style>
 
-<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
-<script src="js/jquery.nicescroll.js"></script>
+<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
+<script src="js/jquery.nicescroll.min.js"></script>
 
 <script>
   var nice = false;
 
-  $(document).ready(function() {
+  $(function() {
     nice = $("html").niceScroll();
   });
   
-  var obj = window;//$(window);
+  var obj = window;
   
   console.log(obj.length);
   console.log("selector" in obj);

File diff suppressed because it is too large
+ 0 - 1
demo/js/jquery.nicescroll.min.js


+ 0 - 2
dist/jquery.nicescroll.iframehelper.js

@@ -76,12 +76,10 @@
             $.nicescroll.each(function () {
                 var nice = this;
                 nice.scrollstart(function () {
-                    console.log("start");
                     if (!hasstyle) sheet.insertRule("iframe { pointer-events: none !important; }", 0);
                     hasstyle = true;
                 });
                 nice.scrollend(function () {
-                    console.log("end");
                     if (hasstyle) sheet.deleteRule(0);
                     hasstyle = false;
                 });

+ 2 - 2
dist/jquery.nicescroll.iframehelper.min.js

@@ -1,2 +1,2 @@
-/* iframe helper for nicescroll v3.7.3 InuYaksa - MIT - https://nicescroll.areaaperta.com */
-!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,o.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,o=t.parent;if(o&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var r=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,i=null,c=[];t.addEventListener("scroll",function(e){i&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){console.log("start"),e||r.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){console.log("end"),e&&r.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);i=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=i=null})})})}}(document,window);
+/* iframe helper for nicescroll v3.7.4 InuYaksa - MIT - https://nicescroll.areaaperta.com */
+!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,r.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,r=t.parent;if(r&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var i=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,o=null,c=[];t.addEventListener("scroll",function(e){o&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){e||i.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){e&&i.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);o=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=o=null})})})}}(document,window);

File diff suppressed because it is too large
+ 200 - 226
dist/jquery.nicescroll.js


File diff suppressed because it is too large
+ 0 - 1
dist/jquery.nicescroll.min.js


+ 0 - 2
jquery.nicescroll.iframehelper.js

@@ -76,12 +76,10 @@
             $.nicescroll.each(function () {
                 var nice = this;
                 nice.scrollstart(function () {
-                    console.log("start");
                     if (!hasstyle) sheet.insertRule("iframe { pointer-events: none !important; }", 0);
                     hasstyle = true;
                 });
                 nice.scrollend(function () {
-                    console.log("end");
                     if (hasstyle) sheet.deleteRule(0);
                     hasstyle = false;
                 });

+ 2 - 2
jquery.nicescroll.iframehelper.min.js

@@ -1,2 +1,2 @@
-/* iframe helper for nicescroll v3.7.3 InuYaksa - MIT - https://nicescroll.areaaperta.com */
-!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,o.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,o=t.parent;if(o&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var r=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,i=null,c=[];t.addEventListener("scroll",function(e){i&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){console.log("start"),e||r.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){console.log("end"),e&&r.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);i=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=i=null})})})}}(document,window);
+/* iframe helper for nicescroll v3.7.4 InuYaksa - MIT - https://nicescroll.areaaperta.com */
+!function(e,t){function n(t){var n=e.createEvent("MouseEvents");n.initEvent("wheel",!0,!0),n.deltaMode=t.deltaMode,n.deltaX=t.deltaX,n.deltaY=t.deltaY,n.deltaZ=t.deltaZ,n.wheelDelta=t.wheelDelta,n.wheelDeltaX=t.wheelDeltaX,n.wheelDeltaY=t.wheelDeltaY,r.dispatchEvent(n)}function l(e){do{if(void 0!==$.data(e,"__nicescroll"))return e;e=e.parentNode||!1}while(e);return!1}var a=e.body,r=t.parent;if(r&&"createEvent"in e){a.addEventListener("wheel",n)}if(t.addEventListener){var i=function(){var t=e.createElement("style");return t.appendChild(e.createTextNode("")),e.head.appendChild(t),t.sheet}(),d=null,o=null,c=[];t.addEventListener("scroll",function(e){o&&t.scrollTo(c[0],c[1])}),t.addEventListener("load",function(){var e=!1;$.nicescroll.each(function(){var t=this;t.scrollstart(function(){e||i.insertRule("iframe { pointer-events: none !important; }",0),e=!0}),t.scrollend(function(){e&&i.deleteRule(0),e=!1})}),$("iframe").each(function(){this.addEventListener("mouseenter",function(e){var n=l(d=e.target);o=n,c=[t.scrollX,t.scrollY]}),this.addEventListener("mouseleave",function(e){d=o=null})})})}}(document,window);

File diff suppressed because it is too large
+ 200 - 226
jquery.nicescroll.js


File diff suppressed because it is too large
+ 0 - 1
jquery.nicescroll.min.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "nicescroll",
-  "version": "3.7.3",
+  "version": "3.7.4",
   "bugs": "https://github.com/inuyaksa/jquery.nicescroll/issues",
   "repository": {
     "type": "git",

Some files were not shown because too many files changed in this diff