Skip to content

Commit 41a7b45

Browse files
author
Adam Bradley
committed
remove flicker before back view transition
1 parent 27311d5 commit 41a7b45

File tree

8 files changed

+18
-9
lines changed

8 files changed

+18
-9
lines changed

dist/css/ionic.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
@charset "UTF-8";
21
/*!
32
* Copyright 2014 Drifty Co.
43
* http://drifty.com/
@@ -2595,6 +2594,9 @@ body, .ionic-body {
25952594
position: absolute;
25962595
z-index: 9999; }
25972596

2597+
.ng-animate .scroll-bar {
2598+
visibility: hidden; }
2599+
25982600
.scroll-bar-h {
25992601
height: 3px;
26002602
left: 2px;

dist/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.

dist/js/ionic-angular.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ angular.module('ionic.service.view', ['ui.router'])
638638
}])
639639

640640
.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',
641-
function( $rootScope, $state, $location, $window, $injector) {
641+
function( $rootScope, $state, $location, $window, $injector) {
642642
var $animate = $injector.has('$animate') ? $injector.get('$animate') : false;
643643

644644
var View = function(){};
@@ -930,6 +930,7 @@ angular.module('ionic.service.view', ['ui.router'])
930930
if($animate && animationClass && opts.doAnimation !== false && opts.navDirection) {
931931
// set the animation we're gonna use
932932
this.setAnimationClass(opts.parentElement, animationClass, opts.navDirection);
933+
opts.enteringElement.addClass('ng-enter');
933934

934935
// start the animations
935936
if(opts.leavingElement) {

dist/js/ionic-angular.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/ionic.min.js

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

js/ext/angular/src/service/ionicView.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ angular.module('ionic.service.view', ['ui.router'])
5151
}])
5252

5353
.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',
54-
function( $rootScope, $state, $location, $window, $injector) {
54+
function( $rootScope, $state, $location, $window, $injector) {
5555
var $animate = $injector.has('$animate') ? $injector.get('$animate') : false;
5656

5757
var View = function(){};
@@ -343,6 +343,7 @@ angular.module('ionic.service.view', ['ui.router'])
343343
if($animate && animationClass && opts.doAnimation !== false && opts.navDirection) {
344344
// set the animation we're gonna use
345345
this.setAnimationClass(opts.parentElement, animationClass, opts.navDirection);
346+
opts.enteringElement.addClass('ng-enter');
346347

347348
// start the animations
348349
if(opts.leavingElement) {

js/ext/angular/test/viewState.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<script id="contact.html" type="text/ng-template">
8686
<view hide-back-button="true">
8787
<content has-header="true" padding="true">
88-
<p>The view's title is blank on purpose.</p>
88+
<p>The views title is blank on purpose.</p>
8989
<p>The hideBackButton attribute is "true" for this view.</p>
9090
<p>@drifty</p>
9191
<p class="text-center">
@@ -188,6 +188,7 @@ <h2>{{ auto.year }} {{ auto.make }} {{ auto.model }}</h2>
188188
<button ng-click="hideBackButton()">Hide Back Button</button>
189189
<button ng-click="showBackButton()">Show Back Button</button>
190190
</p>
191+
<p><a class="button" href="#/tabs/autos">Auto List</a></p>
191192
<p>
192193
Current View: {{ $viewHistory.currentView }}<br>
193194
Back View: {{ $viewHistory.backView }}<br>

scss/_scaffolding.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ body, .ionic-body {
9393
position: absolute;
9494
z-index: $z-index-scroll-bar;
9595
}
96+
// hide the scroll-bar during animations
97+
.ng-animate .scroll-bar {
98+
visibility: hidden;
99+
}
96100
.scroll-bar-h {
97101
height: 3px;
98102
left: 2px;

0 commit comments

Comments
 (0)