Skip to content

Commit

Permalink
event burrito -> subgit
Browse files Browse the repository at this point in the history
  • Loading branch information
wilddeer committed Dec 6, 2013
1 parent 0680159 commit d9ddee2
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 209 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
temp
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "src/burrito"]
path = src/burrito
url = https://github.com/wilddeer/Event-Burrito.git
30 changes: 20 additions & 10 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,43 @@ module.exports = function(grunt) {
banner: '/*!\n * Peppermint touch slider\n * v. <%= pkg.version %> | <%= pkg.homepage %>\n * Copyright <%= pkg.author.name %> | <%= pkg.author.url %>\n *\n * MIT License\n */\n',
uglify: {
options: {
banner: '<%= banner %>',
preserveComments: 'some',
mangle: {
except: ['Peppermint', '$', 'jQuery']
except: ['Peppermint', '$', 'jQuery', 'eventBurrito']
}
},
dist: {
peppermint: {
files: {
'peppermint.min.js': ['src/peppermint.js','src/eventburrito.js']
'temp/peppermint.min.js': ['src/peppermint.js']
}
},
pure: {
burrito: {
files: {
'pure/peppermint.pure.min.js': ['src/peppermint.js']
'temp/eventburrito.min.js': ['src/burrito/eventburrito.js']
}
}
},

concat: {
options: {
banner: '<%= banner %>'
banner: '<%= banner %>',
separator: '\n'
},
dist: {
src: ['src/peppermint.js','src/eventburrito.js'],
full: {
src: ['src/peppermint.js','src/burrito/eventburrito.js'],
dest: 'peppermint.js',
},
pure: {
min: {
src: ['temp/peppermint.min.js','temp/eventburrito.min.js'],
dest: 'peppermint.min.js',
},
pureFull: {
src: ['src/peppermint.js'],
dest: 'pure/peppermint.pure.js'
},
pureMin: {
src: ['temp/peppermint.min.js'],
dest: 'pure/peppermint.pure.min.js'
}
},

Expand Down
11 changes: 7 additions & 4 deletions peppermint.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,13 @@ if (window.jQuery) {
};
})(window.jQuery);
}
/*!
* Event Burrito is a touch / mouse / pointer event unifier
* https://github.com/wilddeer/Event-Burrito
* Copyright Oleg Korsunsky | http://wd.dizaina.net/
*
* MIT License
*/
function eventBurrito(_this, options) {

var o = options || {},
Expand Down Expand Up @@ -604,8 +611,6 @@ function eventBurrito(_this, options) {

getDiff(event);

//console.log(speed.x);

if (Math.abs(diff.x) > o.clickTolerance || Math.abs(diff.y) > o.clickTolerance) clicksAllowed = false; //if there was a move -- deny all the clicks before the next touchstart

//check whether the user is trying to scroll vertically
Expand All @@ -622,8 +627,6 @@ function eventBurrito(_this, options) {
function tEnd(event) {
eventType && getDiff(event);

//console.log(speed.x);

//IE likes to focus the link after touchend.
//Since we dont' want to disable the outline completely for accessibility reasons,
//we just defocus it after touch and disable the outline for `:active` links in css.
Expand Down
10 changes: 9 additions & 1 deletion peppermint.min.js

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

1 change: 1 addition & 0 deletions src/burrito
Submodule burrito added at 7178a6
Loading

0 comments on commit d9ddee2

Please sign in to comment.