Skip to content

Commit 7b4f4cd

Browse files
authored
Merge pull request #385 from mcasimir/fix-prevent-default
Fix prevent default
2 parents 0a8030c + d76de02 commit 7b4f4cd

18 files changed

+107
-32
lines changed

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"dist/fonts/fontawesome-webfont.eot",
1515
"dist/fonts/fontawesome-webfont.svg",
1616
"dist/fonts/fontawesome-webfont.ttf",
17-
"dist/fonts/fontawesome-webfont.woff"
17+
"dist/fonts/fontawesome-webfont.woff",
18+
"dist/fonts/fontawesome-webfont.woff2"
1819
],
1920
"keywords": [
2021
"mobile-angular-ui",

demo/demo.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Here is how to define your module
77
// has dependent on mobile-angular-ui
88
//
9-
let app = angular.module('MobileAngularUiExamples', [
9+
var app = angular.module('MobileAngularUiExamples', [
1010
'ngRoute',
1111
'mobile-angular-ui',
1212

@@ -86,9 +86,9 @@ app.directive('dragToDismiss', function($drag, $parse, $timeout) {
8686
return {
8787
restrict: 'A',
8888
compile: function(elem, attrs) {
89-
let dismissFn = $parse(attrs.dragToDismiss);
89+
var dismissFn = $parse(attrs.dragToDismiss);
9090
return function(scope, elem) {
91-
let dismiss = false;
91+
var dismiss = false;
9292

9393
$drag.bind(elem, {
9494
transform: $drag.TRANSLATE_RIGHT,
@@ -135,7 +135,7 @@ app.directive('carousel', function() {
135135
this.activeItem = null;
136136

137137
this.addItem = function() {
138-
let newId = this.itemCount++;
138+
var newId = this.itemCount++;
139139
this.activeItem = this.itemCount === 1 ? newId : this.activeItem;
140140
return newId;
141141
};
@@ -162,10 +162,10 @@ app.directive('carouselItem', function($drag) {
162162
template: '<div class="item"><div ng-transclude></div></div>',
163163
link: function(scope, elem, attrs, carousel) {
164164
scope.carousel = carousel;
165-
let id = carousel.addItem();
165+
var id = carousel.addItem();
166166

167-
let zIndex = function() {
168-
let res = 0;
167+
var zIndex = function() {
168+
var res = 0;
169169
if (id === carousel.activeItem) {
170170
res = 2000;
171171
} else if (carousel.activeItem < id) {
@@ -190,15 +190,15 @@ app.directive('carouselItem', function($drag) {
190190
//
191191
// use translate both as basis for the new transform:
192192
//
193-
let t = $drag.TRANSLATE_BOTH(element, transform, touch);
193+
var t = $drag.TRANSLATE_BOTH(element, transform, touch);
194194

195195
//
196196
// Add rotation:
197197
//
198-
let Dx = touch.distanceX;
199-
let t0 = touch.startTransform;
200-
let sign = Dx < 0 ? -1 : 1;
201-
let angle = sign * Math.min((Math.abs(Dx) / 700) * 30, 30);
198+
var Dx = touch.distanceX;
199+
var t0 = touch.startTransform;
200+
var sign = Dx < 0 ? -1 : 1;
201+
var angle = sign * Math.min((Math.abs(Dx) / 700) * 30, 30);
202202

203203
t.rotateZ = angle + (Math.round(t0.rotateZ));
204204

@@ -281,9 +281,9 @@ app.controller('MainController', function($rootScope, $scope) {
281281
//
282282
// 'Scroll' screen
283283
//
284-
let scrollItems = [];
284+
var scrollItems = [];
285285

286-
for (let i = 1; i <= 100; i++) {
286+
for (var i = 1; i <= 100; i++) {
287287
scrollItems.push('Item ' + i);
288288
}
289289

@@ -339,12 +339,12 @@ app.controller('MainController', function($rootScope, $scope) {
339339
//
340340
$scope.notices = [];
341341

342-
for (let j = 0; j < 10; j++) {
342+
for (var j = 0; j < 10; j++) {
343343
$scope.notices.push({icon: 'envelope', message: 'Notice ' + (j + 1)});
344344
}
345345

346346
$scope.deleteNotice = function(notice) {
347-
let index = $scope.notices.indexOf(notice);
347+
var index = $scope.notices.indexOf(notice);
348348
if (index > -1) {
349349
$scope.notices.splice(index, 1);
350350
}

demo/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<div class="scrollable">
1+
<div class="scrollable">
22
<div class="scrollable-content">
33

44
<div class="list-group text-center">
55
<div class="list-group-item list-group-item-home">
66
<h1>Mobile Angular UI
7-
Demo <small>1.2</small>
7+
Demo <small>1.3</small>
88
</h1>
99
</div>
1010
<div class="list-group-item list-group-item-home">

demo/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<body
2525
ng-app="MobileAngularUiExamples"
2626
ng-controller="MainController"
27+
ui-prevent-touchmove-defaults
2728
>
2829

2930
<!-- Sidebars -->

demo/sidebar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="scrollable">
2-
<h1 class="scrollable-header app-name">Mobile Angular UI <small>1.2</small></h1>
2+
<h1 class="scrollable-header app-name">Mobile Angular UI <small>1.3</small></h1>
33
<div class="scrollable-content">
44
<div class="list-group" ui-turn-off="uiSidebarLeft">
55
<a class="list-group-item" href="#/">Home <i class="fa fa-chevron-right pull-right"></i></a>

dist/css/mobile-angular-ui-base.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8434,7 +8434,7 @@ body {
84348434
height: 100%;
84358435
width: 100%;
84368436
overflow: hidden;
8437-
font-weight: 300;
8437+
font-weight: 400;
84388438
}
84398439

84408440
a {

dist/css/mobile-angular-ui-base.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/mobile-angular-ui.core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@
883883
var links = $document[0].links;
884884

885885
for (var i = 0; i < links.length; i++) {
886-
var link = angular.element(links[0]);
886+
var link = angular.element(links[i]);
887887
var href = link.attr('href');
888888

889889
if (!href) {

dist/js/mobile-angular-ui.core.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/mobile-angular-ui.core.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)