mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
refactor(slideBox): make it so elements are properly removed
This commit is contained in:
3
js/angular/controller/slideController.js
vendored
3
js/angular/controller/slideController.js
vendored
@@ -7,8 +7,7 @@ function(scope, element, $q) {
|
||||
var self = this;
|
||||
|
||||
scope.$on('$destroy', function() {
|
||||
element.removeData();
|
||||
detachSlide();
|
||||
attachSlide();
|
||||
});
|
||||
element.on(ionic.CSS.TRANSITIONEND, onTransitionEnd);
|
||||
|
||||
|
||||
6
js/angular/service/attachDrag.js
vendored
6
js/angular/service/attachDrag.js
vendored
@@ -20,9 +20,9 @@ IonicModule
|
||||
var dragEndGesture = ionic.onGesture('dragend', handleDragEnd, element[0]);
|
||||
|
||||
scope.$on('$destroy', function() {
|
||||
ionic.offGesture(dragStartGesture);
|
||||
ionic.offGesture(dragGesture);
|
||||
ionic.offGesture(dragEndGesture);
|
||||
ionic.offGesture(dragStartGesture, 'dragstart', handleDragStart);
|
||||
ionic.offGesture(dragGesture, 'drag', handleDrag);
|
||||
ionic.offGesture(dragEndGesture, 'dragend', handleDragEnd);
|
||||
});
|
||||
|
||||
var dragState;
|
||||
|
||||
Reference in New Issue
Block a user