Skip to content

Commit

Permalink
Fix for 'edge', closure.
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Nov 28, 2013
1 parent 1352322 commit 7dd7e38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</style>

<link href="jquery.nouislider.css" rel="stylesheet">
<script src="jquery.nouislider.js"></script>
<script src="min.js"></script>

<script>

Expand Down
9 changes: 6 additions & 3 deletions jquery.nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,12 +650,15 @@

var base = Dt.base, handle, to, point, size;

// The tap event shouldn't propagate up to trigger 'edge'.
event.stopPropagation();

// Determine the direction of the slider.
if ( Op['orientation'] ) {
point = event.pointY;
point = event['pointY'];
size = base.height();
} else {
point = event.pointX;
point = event['pointX'];
size = base.width();
}

Expand All @@ -672,7 +675,7 @@

var handles = Dt.base.data('handles'), to, i;

i = Op['orientation'] ? event.pointY : event.pointX;
i = Op['orientation'] ? event['pointY'] : event['pointX'];
i = i < Dt.base.offset()[Op['style']];

to = i ? 0 : 100;
Expand Down

0 comments on commit 7dd7e38

Please sign in to comment.