Skip to content
This repository has been archived by the owner on Aug 16, 2019. It is now read-only.

Commit

Permalink
updated dependencies to latest, fixed minified filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Breckenridge committed Aug 3, 2013
1 parent 6177ccd commit 3fdb5f9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/snap_js-rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module SnapJs
VERSION = "1.9.0"
VERSION = "1.9.2"
end
12 changes: 9 additions & 3 deletions vendor/assets/javascripts/snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* http://opensource.org/licenses/MIT
*
* Github: http://github.com/jakiestfu/Snap.js/
* Version: 1.9.0
* Version: 1.9.2
*/
/*jslint browser: true*/
/*global define, module, ender*/
Expand Down Expand Up @@ -71,7 +71,7 @@
},
remove: function(el, name){
if(settings.addBodyClasses){
el.className = (el.className).replace(" "+name, "");
el.className = (el.className).replace(name, "").replace(/^\s+|\s+$/g, '');
}
}
},
Expand Down Expand Up @@ -420,6 +420,7 @@

// Tap Close
if (cache.dragWatchers.current === 0 && translated !== 0 && settings.tapToClose) {
utils.dispatchEvent('close');
utils.events.prevent(e);
action.translate.easeTo(0);
cache.isDragging = false;
Expand Down Expand Up @@ -475,7 +476,7 @@
* Public
*/
this.open = function(side) {

utils.dispatchEvent('open');
utils.klass.remove(doc.body, 'snapjs-expand-left');
utils.klass.remove(doc.body, 'snapjs-expand-right');

Expand All @@ -494,15 +495,18 @@
}
};
this.close = function() {
utils.dispatchEvent('close');
action.translate.easeTo(0);
};
this.expand = function(side){
var to = win.innerWidth || doc.documentElement.clientWidth;

if(side==='left'){
utils.dispatchEvent('expandLeft');
utils.klass.add(doc.body, 'snapjs-expand-left');
utils.klass.remove(doc.body, 'snapjs-expand-right');
} else {
utils.dispatchEvent('expandRight');
utils.klass.add(doc.body, 'snapjs-expand-right');
utils.klass.remove(doc.body, 'snapjs-expand-left');
to *= -1;
Expand All @@ -521,9 +525,11 @@
};

this.enable = function() {
utils.dispatchEvent('enable');
action.drag.listen();
};
this.disable = function() {
utils.dispatchEvent('disable');
action.drag.stopListening();
};

Expand Down
11 changes: 0 additions & 11 deletions vendor/assets/javascripts/snap.js.min

This file was deleted.

Loading

0 comments on commit 3fdb5f9

Please sign in to comment.