mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Merge pull request #367 from driftyco/pr/194
Cleanups from @sorich87 for side menus, minus some scope destroy stuff
This commit is contained in:
@@ -60,10 +60,11 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture'])
|
||||
var defaultPrevented = false;
|
||||
var isDragging = false;
|
||||
|
||||
ionic.on('mousedown', function(e) {
|
||||
var readDefaultPrevented = function(e) {
|
||||
// If the child element prevented the drag, don't drag
|
||||
defaultPrevented = e.defaultPrevented;
|
||||
});
|
||||
}
|
||||
ionic.on('mousedown', readDefaultPrevented);
|
||||
|
||||
// Listen for taps on the content to close the menu
|
||||
/*
|
||||
@@ -136,6 +137,7 @@ angular.module('ionic.ui.sideMenu', ['ionic.service.gesture'])
|
||||
Gesture.off(dragUpGesture, 'dragup', dragFn);
|
||||
Gesture.off(dragDownGesture, 'dragdown', dragFn);
|
||||
Gesture.off(releaseGesture, 'release', dragReleaseFn);
|
||||
ionic.off('mousedown', readDefaultPrevented);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user