Skip to content

Commit

Permalink
shrinking and fading scrollbar
Browse files Browse the repository at this point in the history
  • Loading branch information
cubiq committed Dec 16, 2013
1 parent 3a224ff commit d2701fb
Show file tree
Hide file tree
Showing 19 changed files with 632 additions and 111 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
._*
node_modules
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2008-2013 Matteo Spinelli, http://cubiq.org/
Copyright (c) 2008-2013 Matteo Spinelli, http://cubiq.org

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
3 changes: 0 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var uglify = require('uglify-js');
var banner = '/*! iScroll v' + pkg.version + ' ~ (c) 2008-' + (new Date().getFullYear()) + ' Matteo Spinelli ~ http://cubiq.org/license */\n';

var releases = {
// Main releases
lite: {
files: ['default/_animate.js', 'default/handleEvent.js']
},
Expand Down Expand Up @@ -52,8 +51,6 @@ var releases = {
],
postProcessing: [ 'zoom/build.json', 'indicator/build.json', 'wheel/build.json', 'snap/build.json', 'keys/build.json' ]
}

// Additional releases TBD
};

var args = process.argv.slice(2);
Expand Down
9 changes: 7 additions & 2 deletions build/iscroll-lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ var utils = (function () {
transform: _transform,
transitionTimingFunction: _prefixStyle('transitionTimingFunction'),
transitionDuration: _prefixStyle('transitionDuration'),
transitionDelay: _prefixStyle('transitionDelay'),
transformOrigin: _prefixStyle('transformOrigin')
});

Expand Down Expand Up @@ -307,6 +308,9 @@ function IScroll (el, options) {
this.enable();
}

// Expose the utils
IScroll.utils = utils;

IScroll.prototype = {
version: '5.0.8',

Expand Down Expand Up @@ -503,8 +507,6 @@ IScroll.prototype = {
time = 0,
easing = '';

this.scrollTo(newX, newY); // ensures that the last position is rounded

this.isInTransition = 0;
this.initiated = 0;
this.endTime = utils.getTime();
Expand All @@ -514,6 +516,8 @@ IScroll.prototype = {
return;
}

this.scrollTo(newX, newY); // ensures that the last position is rounded

// we scrolled less than 10 pixels
if ( !this.moved ) {
if ( this.options.tap ) {
Expand All @@ -524,6 +528,7 @@ IScroll.prototype = {
utils.click(e);
}

this._execEvent('scrollCancel');
return;
}

Expand Down
Loading

0 comments on commit d2701fb

Please sign in to comment.