Skip to content

Commit

Permalink
Cleaned some debugging code
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Sep 22, 2013
1 parent 845d569 commit 7e76fc8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
9 changes: 4 additions & 5 deletions jquery.nouislider.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,30 +531,29 @@
,style = base.data('style')
,eventXY = event[style === 'left' ? 'x' : 'y']
,baseSize = style === 'left' ? base.width() : base.height()

// Create a standard set off offsets compensated with the
// scroll distance. When required, correct for scrolling.
// This is a bug, as far as I can see, in IE(10?).
,correction = {
x: ( event.t[2] ? window.pageXOffset : 0 )
,y: ( event.t[2] ? window.pageYOffset : 0 )
}
,offset = {
handles: []
,base: {
left: base.offset().left - correction.x
,top: base.offset().top// - correction.y
,top: base.offset().top
}
};

// Loop handles and add data to the offset list.
for (i = 0; i < handles.length; i++ ) {
offset.handles.push({
left: handles[i].offset().left - correction.x
,top: handles[i].offset().top// - correction.y
,top: handles[i].offset().top
});
}

console.log('Correction: ' + correction.y + ' Handle offset: ' + offset.handles[0].top, ' Event: ' + eventXY + ' Base offset: ' + offset.base.top);

// Calculate the central point between the handles;
var handleCenter = handles.length === 1 ? 0 :
(( offset.handles[0][style] + offset.handles[1][style] ) / 2 );
Expand Down
26 changes: 13 additions & 13 deletions jquery.nouislider.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7e76fc8

Please sign in to comment.