mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(click): Click Events In SlideBox Fire Multiple Times, closes #808
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<ion-side-menus>
|
||||
<ion-pane ion-side-menu-content>
|
||||
<ion-header-bar left-buttons="leftButtons" right-buttons="rightButtons" title=""></ion-header-bar>
|
||||
<ion-slide-box on-slide-changed="slideChanged(index)" does-continue="true">
|
||||
<ion-slide-box on-slide-changed="slideChanged(index)">
|
||||
<ion-slide ng-controller="FirstSlideCtrl">
|
||||
<h3>Thank you for choosing the Awesome App!</h3>
|
||||
<div id="logo">
|
||||
@@ -61,6 +61,9 @@
|
||||
<p>
|
||||
<button class="button button-dark" ng-click="toLast()">Skip to last</button>
|
||||
</p>
|
||||
<p>
|
||||
<button class="button button-dark" ng-click="clickTest()">Click Test</button>
|
||||
</p>
|
||||
</ion-slide>
|
||||
<ion-slide>
|
||||
<h3>Using Awesome</h3>
|
||||
@@ -100,6 +103,13 @@
|
||||
$scope.$broadcast('slideBox.nextSlide');
|
||||
};
|
||||
|
||||
var clickCount = 0;
|
||||
|
||||
$scope.clickTest = function() {
|
||||
clickCount++;
|
||||
console.log('click', clickCount);
|
||||
};
|
||||
|
||||
var rightButtons = [
|
||||
{
|
||||
content: 'Next',
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
gesture.originalEvent.changedTouches[0]) ||
|
||||
touches[0].originalEvent || touches[0];
|
||||
|
||||
if(e) return { x: e.clientX, y: e.clientY };
|
||||
if(e) return { x: e.clientX || e.pageX, y: e.clientY || e.pageY };
|
||||
}
|
||||
return { x:0, y:0 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user