Skip to content

Commit

Permalink
latest build
Browse files Browse the repository at this point in the history
  • Loading branch information
skhilko committed Apr 9, 2015
1 parent 0858558 commit cdfdc6b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dist/maps/stickyheaders.jquery.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/maps/stickyheaders.min.js.map

Large diffs are not rendered by default.

11 changes: 10 additions & 1 deletion dist/scripts/stickyheaders.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ var SCROLL_WIDTH = (function() {
return scrollbarWidth;
})();

var STYLE_TRANSFORM = (function getTransitionEndEventName() {
var transforms = ['transform', 'webkitTransform'];
for (var i = 0; i < transforms.length; i++) {
if( document.body.style[transforms[i]] !== undefined ){
return transforms[i];
}
}
})();

var SCROLL_STEP_DEFAULT = 50;
var LINE_HEIGHT = 16;

Expand Down Expand Up @@ -136,7 +145,7 @@ StickyHeaders.prototype.updateHeaders = function() {
shiftAmount += this.headerContainerHeight - this.stuckHeadersHeight;

requestAnimationFrame(function(containerOffset) {
this.headerContainer.style.transform = 'translateY(' + containerOffset + 'px)';
this.headerContainer.style[STYLE_TRANSFORM] = 'translateY(' + containerOffset + 'px)';
this._updating = false;
}.bind(this, shiftAmount));
};
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/stickyheaders.jquery.min.js

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

11 changes: 10 additions & 1 deletion dist/scripts/stickyheaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ var SCROLL_WIDTH = (function() {
return scrollbarWidth;
})();

var STYLE_TRANSFORM = (function getTransitionEndEventName() {
var transforms = ['transform', 'webkitTransform'];
for (var i = 0; i < transforms.length; i++) {
if( document.body.style[transforms[i]] !== undefined ){
return transforms[i];
}
}
})();

var SCROLL_STEP_DEFAULT = 50;
var LINE_HEIGHT = 16;

Expand Down Expand Up @@ -136,7 +145,7 @@ StickyHeaders.prototype.updateHeaders = function() {
shiftAmount += this.headerContainerHeight - this.stuckHeadersHeight;

requestAnimationFrame(function(containerOffset) {
this.headerContainer.style.transform = 'translateY(' + containerOffset + 'px)';
this.headerContainer.style[STYLE_TRANSFORM] = 'translateY(' + containerOffset + 'px)';
this._updating = false;
}.bind(this, shiftAmount));
};
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/stickyheaders.min.js

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

0 comments on commit cdfdc6b

Please sign in to comment.