Skip to content

Commit e2dc7bc

Browse files
committed
release: v1.0.0-rc.2 "palladium-platypus"
1 parent d058d52 commit e2dc7bc

14 files changed

+933
-143
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
### 1.0.0-rc.2 "palladium-platypus" (2015-03-30)
2+
3+
4+
#### Bug Fixes
5+
6+
* **activator:** adds activated class to buttons in nav-bar and header-bars ([36df5086](https://github.com/driftyco/ionic/commit/36df50863853dcf4faee77cbf40c93c4556c11c1), closes [#3348](https://github.com/driftyco/ionic/issues/3348))
7+
* **keyboard:** enable keyboard accessory bar more quickly after focus ([7bf1207a](https://github.com/driftyco/ionic/commit/7bf1207a54bb482d1fdb2cf13620ef2837ffab18), closes [#3113](https://github.com/driftyco/ionic/issues/3113))
8+
* **popover:** fix popover position on Internet Explorer ([893fcbec](https://github.com/driftyco/ionic/commit/893fcbec5f97eb487d602ab2c19459924c0098b0), closes [#2861](https://github.com/driftyco/ionic/issues/2861))
9+
* **popup:** prevent scrollbars from showing on desktop unecessarily. ([b8df44d4](https://github.com/driftyco/ionic/commit/b8df44d4c44e47516032b96cac79147eb48afe4c), closes [#3204](https://github.com/driftyco/ionic/issues/3204))
10+
* **scrolling:** Prevent gestures from breaking native scrolling ([e917cae3](https://github.com/driftyco/ionic/commit/e917cae3346ba3e78e5a4126704bdc102e33ae95))
11+
12+
13+
#### Features
14+
15+
* **scrolling:** add native scroll delegate ([bda4de1c](https://github.com/driftyco/ionic/commit/bda4de1c30bc799e2b48f769d472f391282c7e49))
16+
17+
118
### 1.0.0-rc.1 "osmium-ostrich" (2015-03-16)
219

320

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ionic",
3-
"version": "1.0.0-rc.1",
4-
"codename": "osmium-ostrich",
3+
"version": "1.0.0-rc.2",
4+
"codename": "palladium-platypus",
55
"homepage": "https://github.com/driftyco/ionic",
66
"authors": [
77
"Max Lynch <[email protected]>",

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"repo": "driftyco/ionic",
33
"development": {},
4-
"version": "1.0.0-rc.1",
4+
"version": "1.0.0-rc.2",
55
"styles": [
66
"dist/css/ionic.css"
77
],

config/CODENAMES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
palladium-platypus
21
radium-raccoon
32
sulfur-snake

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ionic",
33
"private": false,
44
"version": "1.0.0-rc.2",
5-
"codename": "osmium-ostrich",
5+
"codename": "palladium-platypus",
66
"repository": {
77
"url": "git://github.com/driftyco/ionic.git"
88
},

release/css/ionic.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2014 Drifty Co.
33
* http://drifty.com/
44
*
5-
* Ionic, v1.0.0-rc.1
5+
* Ionic, v1.0.0-rc.2
66
* A powerful HTML5 mobile app framework.
77
* http://ionicframework.com/
88
*
@@ -4542,7 +4542,7 @@ ion-tabs.tabs-color-active-dark .tab-item {
45424542

45434543
.popup-body {
45444544
padding: 10px;
4545-
overflow: scroll; }
4545+
overflow: auto; }
45464546

45474547
.popup-buttons {
45484548
display: -webkit-box;

release/css/ionic.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

release/js/ionic-angular.js

Lines changed: 73 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright 2014 Drifty Co.
33
* http://drifty.com/
44
*
5-
* Ionic, v1.0.0-rc.1
5+
* Ionic, v1.0.0-rc.2
66
* A powerful HTML5 mobile app framework.
77
* http://ionicframework.com/
88
*
@@ -2944,8 +2944,9 @@ function($ionicModal, $ionicPosition, $document, $window) {
29442944
var buttonOffset = $ionicPosition.offset(targetEle);
29452945
var popoverWidth = popoverEle.prop('offsetWidth');
29462946
var popoverHeight = popoverEle.prop('offsetHeight');
2947-
var bodyWidth = $document[0].body.clientWidth;
2948-
// clientHeight doesn't work on all platforms for body
2947+
// Use innerWidth and innerHeight, because clientWidth and clientHeight
2948+
// doesn't work consistently for body on all platforms
2949+
var bodyWidth = $window.innerWidth;
29492950
var bodyHeight = $window.innerHeight;
29502951

29512952
var popoverCSS = {
@@ -6674,8 +6675,8 @@ IonicModule
66746675
scrollParent = $element.parent().parent()[0];
66756676
scrollChild = $element.parent()[0];
66766677

6677-
if (!scrollParent.classList.contains('ionic-scroll') ||
6678-
!scrollChild.classList.contains('scroll')) {
6678+
if (!scrollParent || !scrollParent.classList.contains('ionic-scroll') ||
6679+
!scrollChild || !scrollChild.classList.contains('scroll')) {
66796680
throw new Error('Refresher must be immediate child of ion-content or ion-scroll');
66806681
}
66816682

@@ -6778,10 +6779,19 @@ function($scope,
67786779
self.__timeout = $timeout;
67796780

67806781
self._scrollViewOptions = scrollViewOptions; //for testing
6782+
self.isNative = function() {
6783+
return !!scrollViewOptions.nativeScrolling;
6784+
};
67816785

67826786
var element = self.element = scrollViewOptions.el;
67836787
var $element = self.$element = jqLite(element);
6784-
var scrollView = self.scrollView = new ionic.views.Scroll(scrollViewOptions);
6788+
var scrollView;
6789+
if (self.isNative()) {
6790+
scrollView = self.scrollView = new ionic.views.ScrollNative(scrollViewOptions);
6791+
} else {
6792+
scrollView = self.scrollView = new ionic.views.Scroll(scrollViewOptions);
6793+
}
6794+
67856795

67866796
//Attach self to element as a controller so other directives can require this controller
67876797
//through `require: '$ionicScroll'
@@ -9279,37 +9289,55 @@ function($timeout, $controller, $ionicBind, $ionicConfig) {
92799289

92809290
if ($attr.scroll === "false") {
92819291
//do nothing
9282-
} else if (attr.overflowScroll === "true" || !$ionicConfig.scrolling.jsScrolling()) {
9283-
// use native scrolling
9284-
$element.addClass('overflow-scroll');
92859292
} else {
9286-
var scrollViewOptions = {
9287-
el: $element[0],
9288-
delegateHandle: attr.delegateHandle,
9289-
locking: (attr.locking || 'true') === 'true',
9290-
bouncing: $scope.$eval($scope.hasBouncing),
9291-
startX: $scope.$eval($scope.startX) || 0,
9292-
startY: $scope.$eval($scope.startY) || 0,
9293-
scrollbarX: $scope.$eval($scope.scrollbarX) !== false,
9294-
scrollbarY: $scope.$eval($scope.scrollbarY) !== false,
9295-
scrollingX: $scope.direction.indexOf('x') >= 0,
9296-
scrollingY: $scope.direction.indexOf('y') >= 0,
9297-
scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 10,
9298-
scrollingComplete: function() {
9299-
$scope.$onScrollComplete({
9300-
scrollTop: this.__scrollTop,
9301-
scrollLeft: this.__scrollLeft
9302-
});
9303-
}
9304-
};
9293+
var scrollViewOptions = {};
9294+
9295+
if (attr.overflowScroll === "true" || !$ionicConfig.scrolling.jsScrolling()) {
9296+
// use native scrolling
9297+
$element.addClass('overflow-scroll');
9298+
9299+
scrollViewOptions = {
9300+
el: $element[0],
9301+
delegateHandle: attr.delegateHandle,
9302+
startX: $scope.$eval($scope.startX) || 0,
9303+
startY: $scope.$eval($scope.startY) || 0,
9304+
nativeScrolling:true
9305+
};
9306+
9307+
} else {
9308+
// Use JS scrolling
9309+
scrollViewOptions = {
9310+
el: $element[0],
9311+
delegateHandle: attr.delegateHandle,
9312+
locking: (attr.locking || 'true') === 'true',
9313+
bouncing: $scope.$eval($scope.hasBouncing),
9314+
startX: $scope.$eval($scope.startX) || 0,
9315+
startY: $scope.$eval($scope.startY) || 0,
9316+
scrollbarX: $scope.$eval($scope.scrollbarX) !== false,
9317+
scrollbarY: $scope.$eval($scope.scrollbarY) !== false,
9318+
scrollingX: $scope.direction.indexOf('x') >= 0,
9319+
scrollingY: $scope.direction.indexOf('y') >= 0,
9320+
scrollEventInterval: parseInt($scope.scrollEventInterval, 10) || 10,
9321+
scrollingComplete: function() {
9322+
$scope.$onScrollComplete({
9323+
scrollTop: this.__scrollTop,
9324+
scrollLeft: this.__scrollLeft
9325+
});
9326+
}
9327+
};
9328+
}
9329+
9330+
// init scroll controller with appropriate options
93059331
$controller('$ionicScroll', {
93069332
$scope: $scope,
93079333
scrollViewOptions: scrollViewOptions
93089334
});
93099335

93109336
$scope.$on('$destroy', function() {
9311-
scrollViewOptions.scrollingComplete = noop;
9312-
delete scrollViewOptions.el;
9337+
if (scrollViewOptions) {
9338+
scrollViewOptions.scrollingComplete = noop;
9339+
delete scrollViewOptions.el;
9340+
}
93139341
innerElement = null;
93149342
$element = null;
93159343
attr.$$element = null;
@@ -9926,10 +9954,14 @@ IonicModule
99269954
link: function($scope, $element, $attrs, ctrls) {
99279955
var infiniteScrollCtrl = ctrls[1];
99289956
var scrollCtrl = infiniteScrollCtrl.scrollCtrl = ctrls[0];
9929-
var jsScrolling = infiniteScrollCtrl.jsScrolling = !!scrollCtrl;
9957+
var jsScrolling = infiniteScrollCtrl.jsScrolling = !scrollCtrl.isNative();
9958+
99309959
// if this view is not beneath a scrollCtrl, it can't be injected, proceed w/ native scrolling
99319960
if (jsScrolling) {
99329961
infiniteScrollCtrl.scrollView = scrollCtrl.scrollView;
9962+
$scope.scrollingType = 'js-scrolling';
9963+
//bind to JS scroll events
9964+
scrollCtrl.$element.on('scroll', infiniteScrollCtrl.checkBounds);
99339965
} else {
99349966
// grabbing the scrollable element, to determine dimensions, and current scroll pos
99359967
var scrollEl = ionic.DomUtil.getParentOrSelfWithClass($element[0].parentNode,'overflow-scroll');
@@ -9938,14 +9970,10 @@ IonicModule
99389970
if (!scrollEl) {
99399971
throw 'Infinite scroll must be used inside a scrollable div';
99409972
}
9941-
}
9942-
//bind to appropriate scroll event
9943-
if (jsScrolling) {
9944-
$scope.scrollingType = 'js-scrolling';
9945-
scrollCtrl.$element.on('scroll', infiniteScrollCtrl.checkBounds);
9946-
} else {
9973+
//bind to native scroll events
99479974
infiniteScrollCtrl.scrollEl.addEventListener('scroll', infiniteScrollCtrl.checkBounds);
99489975
}
9976+
99499977
// Optionally check bounds on start after scrollView is fully rendered
99509978
var doImmediateCheck = isDefined($attrs.immediateCheck) ? $scope.$eval($attrs.immediateCheck) : true;
99519979
if (doImmediateCheck) {
@@ -11524,6 +11552,7 @@ IonicModule
1152411552
* of the refresher.
1152511553
* @param {expression=} on-pulling Called when the user starts to pull down
1152611554
* on the refresher.
11555+
* @param {string=} pulling-text The text to display while the user is pulling down.
1152711556
* @param {string=} pulling-icon The icon to display while the user is pulling down.
1152811557
* Default: 'ion-android-arrow-down'.
1152911558
* @param {string=} spinner The {@link ionic.directive:ionSpinner} icon to display
@@ -11563,10 +11592,11 @@ IonicModule
1156311592
// JS Scrolling uses the scroll controller
1156411593
var scrollCtrl = ctrls[0],
1156511594
refresherCtrl = ctrls[1];
11566-
11567-
if (!!scrollCtrl) {
11595+
if (!scrollCtrl || scrollCtrl.isNative()) {
11596+
// Kick off native scrolling
11597+
refresherCtrl.init();
11598+
} else {
1156811599
$element[0].classList.add('js-scrolling');
11569-
1157011600
scrollCtrl._setRefresher(
1157111601
$scope,
1157211602
$element[0],
@@ -11578,10 +11608,6 @@ IonicModule
1157811608
scrollCtrl.scrollView.finishPullToRefresh();
1157911609
});
1158011610
});
11581-
11582-
} else {
11583-
// Kick off native scrolling
11584-
refresherCtrl.init();
1158511611
}
1158611612

1158711613
}
@@ -11951,6 +11977,9 @@ function($timeout, $ionicGesture, $window) {
1195111977

1195211978
// add gesture handlers
1195311979
var gestureOpts = { stop_browser_behavior: false };
11980+
if (ionic.DomUtil.getParentOrSelfWithClass($element[0],'overflow-scroll')) {
11981+
gestureOpts.prevent_default_directions = ['left','right'];
11982+
}
1195411983
var contentTapGesture = $ionicGesture.on('tap', onContentTap, $element, gestureOpts);
1195511984
var dragRightGesture = $ionicGesture.on('dragright', onDragX, $element, gestureOpts);
1195611985
var dragLeftGesture = $ionicGesture.on('dragleft', onDragX, $element, gestureOpts);

release/js/ionic-angular.min.js

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)