Delete item works

This commit is contained in:
Max Lynch
2013-10-10 16:29:35 -05:00
parent 92c0d2315b
commit 82ba734a73
5 changed files with 34 additions and 36 deletions

View File

@ -1,40 +1,31 @@
(function(ionic) {
/**
* The ListView handles a list of items. It will process drag animations, edit mode,
* and other operations that are common on mobile lists or table views.
*/
ionic.views.List = function(opts) {
var _this = this;
this.el = opts.el;
this.dragThresholdX = 10;
// The amount of dragging required to start sliding the element over (in pixels)
this.dragThresholdX = opts.dragThresholdX || 10;
// Start the drag states
this._initDrag();
// Listen for drag and release events
window.ionic.onGesture('drag', function(e) {
_this._handleDrag(e);
}, this.el);
window.ionic.onGesture('release', function(e) {
_this._handleEndDrag(e);
}, this.el);
/*
window.ionic.onGesture('swipeleft', function(e) {
_this._handleSwipeLeft(e);
e.gesture.stopDetect();
return false;
}, this.el);
window.ionic.onGesture('swiperight', function(e) {
_this._handleSwipeRight(e);
e.gesture.stopDetect();
return false;
}, this.el);
*/
};
ionic.views.List.prototype = {
_initDrag: function() {
this._offsetX = 0;
this._deltaSlowX = null;
this._isDragging = false;
this._currentDrag = null;
},