mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Fixed reordering for #319
This commit is contained in:
1
dist/js/ionic-angular.js
vendored
1
dist/js/ionic-angular.js
vendored
@@ -1005,6 +1005,7 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
refreshComplete: '=',
|
||||
onSelect: '&',
|
||||
onDelete: '&',
|
||||
onReorder: '&',
|
||||
optionButtons: '&',
|
||||
deleteIcon: '@',
|
||||
reorderIcon: '@'
|
||||
|
||||
27
dist/js/ionic.js
vendored
27
dist/js/ionic.js
vendored
@@ -4483,9 +4483,12 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
}, this.el);
|
||||
|
||||
window.ionic.onGesture('release', function(e) {
|
||||
_this._handleTouchRelease(e);
|
||||
_this._handleEndDrag(e);
|
||||
}, this.el);
|
||||
|
||||
window.ionic.onGesture('drag', function(e) {
|
||||
_this._handleDrag(e);
|
||||
}, this.el);
|
||||
// Start the drag states
|
||||
this._initDrag();
|
||||
},
|
||||
@@ -4618,6 +4621,13 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
return;
|
||||
}
|
||||
|
||||
// Cancel touch timeout
|
||||
clearTimeout(this._touchTimeout);
|
||||
var items = _this.el.querySelectorAll('.item');
|
||||
for(var i = 0, l = items.length; i < l; i++) {
|
||||
items[i].classList.remove('active');
|
||||
}
|
||||
|
||||
this._dragOp.end(e, function() {
|
||||
_this._initDrag();
|
||||
});
|
||||
@@ -4648,7 +4658,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.gesture.srcEvent.preventDefault();
|
||||
this._dragOp.drag(e);
|
||||
},
|
||||
|
||||
@@ -4670,19 +4680,6 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
}, 250);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle the release event to remove the active state on an item if necessary.
|
||||
*/
|
||||
_handleTouchRelease: function(e) {
|
||||
var _this = this;
|
||||
|
||||
// Cancel touch timeout
|
||||
clearTimeout(this._touchTimeout);
|
||||
var items = _this.el.querySelectorAll('.item');
|
||||
for(var i = 0, l = items.length; i < l; i++) {
|
||||
items[i].classList.remove('active');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(ionic);
|
||||
|
||||
1
js/ext/angular/src/directive/ionicList.js
vendored
1
js/ext/angular/src/directive/ionicList.js
vendored
@@ -207,6 +207,7 @@ angular.module('ionic.ui.list', ['ngAnimate'])
|
||||
refreshComplete: '=',
|
||||
onSelect: '&',
|
||||
onDelete: '&',
|
||||
onReorder: '&',
|
||||
optionButtons: '&',
|
||||
deleteIcon: '@',
|
||||
reorderIcon: '@'
|
||||
|
||||
@@ -285,9 +285,12 @@
|
||||
}, this.el);
|
||||
|
||||
window.ionic.onGesture('release', function(e) {
|
||||
_this._handleTouchRelease(e);
|
||||
_this._handleEndDrag(e);
|
||||
}, this.el);
|
||||
|
||||
window.ionic.onGesture('drag', function(e) {
|
||||
_this._handleDrag(e);
|
||||
}, this.el);
|
||||
// Start the drag states
|
||||
this._initDrag();
|
||||
},
|
||||
@@ -420,6 +423,13 @@
|
||||
return;
|
||||
}
|
||||
|
||||
// Cancel touch timeout
|
||||
clearTimeout(this._touchTimeout);
|
||||
var items = _this.el.querySelectorAll('.item');
|
||||
for(var i = 0, l = items.length; i < l; i++) {
|
||||
items[i].classList.remove('active');
|
||||
}
|
||||
|
||||
this._dragOp.end(e, function() {
|
||||
_this._initDrag();
|
||||
});
|
||||
@@ -450,7 +460,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.gesture.srcEvent.preventDefault();
|
||||
this._dragOp.drag(e);
|
||||
},
|
||||
|
||||
@@ -472,19 +482,6 @@
|
||||
}, 250);
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle the release event to remove the active state on an item if necessary.
|
||||
*/
|
||||
_handleTouchRelease: function(e) {
|
||||
var _this = this;
|
||||
|
||||
// Cancel touch timeout
|
||||
clearTimeout(this._touchTimeout);
|
||||
var items = _this.el.querySelectorAll('.item');
|
||||
for(var i = 0, l = items.length; i < l; i++) {
|
||||
items[i].classList.remove('active');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(ionic);
|
||||
|
||||
Reference in New Issue
Block a user