From db01caf3f4b2c53243bf41c1228e9c5a7aee79d8 Mon Sep 17 00:00:00 2001 From: Asaf David Date: Tue, 25 Feb 2014 10:39:46 +0200 Subject: [PATCH] Merge pull requests --- bower.json | 2 +- dist/ng-scrollbar.js | 1 + dist/ng-scrollbar.min.js | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index fc717a7..5472ba0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ng-scrollbar", - "version": "0.0.1", + "version": "0.0.3", "dependencies": { }, "devDependencies": { diff --git a/dist/ng-scrollbar.js b/dist/ng-scrollbar.js index 08be35e..8326c94 100644 --- a/dist/ng-scrollbar.js +++ b/dist/ng-scrollbar.js @@ -101,6 +101,7 @@ angular.module('ngScrollbar', []).directive('ngScrollbar', [ event.stopPropagation(); }); win.bind('mousemove', dragHandler); + event.preventDefault(); }); } else { scope.showYScrollbar = false; diff --git a/dist/ng-scrollbar.min.js b/dist/ng-scrollbar.min.js index 0cecb36..657ec0f 100644 --- a/dist/ng-scrollbar.min.js +++ b/dist/ng-scrollbar.min.js @@ -1,8 +1,8 @@ /** * ng-scrollbar - * @version v0.0.1 - 2014-02-04 + * @version v0.0.1 - 2014-02-25 * @link https://github.com/asafdav/ng-scrollbar * @author Asaf David <> * @license MIT License, http://www.opensource.org/licenses/MIT */ -"use strict";angular.module("ngScrollbar",[]).directive("ngScrollbar",["$parse","$window",function(a,b){return{restrict:"A",replace:!0,transclude:!0,link:function(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q={top:0},r={top:0},s=function(){l={position:"relative",overflow:"hidden","max-width":"100%",height:"100%"},r.height&&(l.height=r.height+"px"),m={position:"absolute",height:q.height+"px",top:q.top+"px"},n={position:"relative","line-height":q.height+"px"},o={position:"relative",top:r.top+"px",overflow:"hidden"}},t=function(){i.css("top",q.top+"px");var a=q.top/r.height;r.top=-Math.round(r.scrollHeight*a),g.css("top",r.top+"px")},u=function(a){var b=a.hasOwnProperty("offsetY")?a.offsetY:a.layerY,c=Math.max(0,Math.min(parseInt(q.trackHeight,10)-parseInt(q.height,10),b));q.top=c,t(),a.stopPropagation()},v=function(a){var b=void 0!==a.wheelDeltaY?a.wheelDeltaY/20:void 0!==a.wheelDelta?a.wheelDelta/20:2*-a.detail;return q.top=Math.max(0,Math.min(parseInt(r.height,10)-parseInt(q.height,10),parseInt(q.top,10)-b)),t(),a.preventDefault?void a.preventDefault():!1},w=function(a,b,c){var d=Math.max(0,Math.min(parseInt(q.trackHeight,10)-parseInt(q.height,10),c));q.top=d,a.stopPropagation()},x=function(a){var b=a.pageY-i[0].scrollTop-p,c=0;w(a,c,b),t()},y=function(){if(e=angular.element(b),f=angular.element(c.children()[0]),g=angular.element(f.children()[0]),h=angular.element(f.children()[1]),i=angular.element(angular.element(h.children()[0]).children()[0]),j=angular.element(i.children()[0]),k=angular.element(angular.element(h.children()[0]).children()[1]),r.height=c[0].offsetHeight,r.scrollHeight=g[0].scrollHeight,r.height
'}}]); \ No newline at end of file +"use strict";angular.module("ngScrollbar",[]).directive("ngScrollbar",["$parse","$window",function(a,b){return{restrict:"A",replace:!0,transclude:!0,link:function(a,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q={top:0},r={top:0},s=function(){l={position:"relative",overflow:"hidden","max-width":"100%",height:"100%"},r.height&&(l.height=r.height+"px"),m={position:"absolute",height:q.height+"px",top:q.top+"px"},n={position:"relative","line-height":q.height+"px"},o={position:"relative",top:r.top+"px",overflow:"hidden"}},t=function(){i.css("top",q.top+"px");var a=q.top/r.height;r.top=-Math.round(r.scrollHeight*a),g.css("top",r.top+"px")},u=function(a){var b=a.hasOwnProperty("offsetY")?a.offsetY:a.layerY,c=Math.max(0,Math.min(parseInt(q.trackHeight,10)-parseInt(q.height,10),b));q.top=c,t(),a.stopPropagation()},v=function(a){var b=void 0!==a.wheelDeltaY?a.wheelDeltaY/20:void 0!==a.wheelDelta?a.wheelDelta/20:2*-a.detail;return q.top=Math.max(0,Math.min(parseInt(r.height,10)-parseInt(q.height,10),parseInt(q.top,10)-b)),t(),a.preventDefault?void a.preventDefault():!1},w=function(a,b,c){var d=Math.max(0,Math.min(parseInt(q.trackHeight,10)-parseInt(q.height,10),c));q.top=d,a.stopPropagation()},x=function(a){var b=a.pageY-i[0].scrollTop-p,c=0;w(a,c,b),t()},y=function(){if(e=angular.element(b),f=angular.element(c.children()[0]),g=angular.element(f.children()[0]),h=angular.element(f.children()[1]),i=angular.element(angular.element(h.children()[0]).children()[0]),j=angular.element(i.children()[0]),k=angular.element(angular.element(h.children()[0]).children()[1]),r.height=c[0].offsetHeight,r.scrollHeight=g[0].scrollHeight,r.height
'}}]); \ No newline at end of file