remove flicker before back view transition

This commit is contained in:
Adam Bradley
2014-01-13 22:53:51 -06:00
parent 27311d5d18
commit 41a7b45f0e
8 changed files with 18 additions and 9 deletions

4
dist/css/ionic.css vendored
View File

@@ -1,4 +1,3 @@
@charset "UTF-8";
/*!
* Copyright 2014 Drifty Co.
* http://drifty.com/
@@ -2595,6 +2594,9 @@ body, .ionic-body {
position: absolute;
z-index: 9999; }
.ng-animate .scroll-bar {
visibility: hidden; }
.scroll-bar-h {
height: 3px;
left: 2px;

View File

File diff suppressed because one or more lines are too long

View File

@@ -638,7 +638,7 @@ angular.module('ionic.service.view', ['ui.router'])
}])
.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',
function( $rootScope, $state, $location, $window, $injector) {
function( $rootScope, $state, $location, $window, $injector) {
var $animate = $injector.has('$animate') ? $injector.get('$animate') : false;
var View = function(){};
@@ -930,6 +930,7 @@ angular.module('ionic.service.view', ['ui.router'])
if($animate && animationClass && opts.doAnimation !== false && opts.navDirection) {
// set the animation we're gonna use
this.setAnimationClass(opts.parentElement, animationClass, opts.navDirection);
opts.enteringElement.addClass('ng-enter');
// start the animations
if(opts.leavingElement) {

View File

File diff suppressed because one or more lines are too long

View File

File diff suppressed because one or more lines are too long

View File

@@ -51,7 +51,7 @@ angular.module('ionic.service.view', ['ui.router'])
}])
.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',
function( $rootScope, $state, $location, $window, $injector) {
function( $rootScope, $state, $location, $window, $injector) {
var $animate = $injector.has('$animate') ? $injector.get('$animate') : false;
var View = function(){};
@@ -343,6 +343,7 @@ angular.module('ionic.service.view', ['ui.router'])
if($animate && animationClass && opts.doAnimation !== false && opts.navDirection) {
// set the animation we're gonna use
this.setAnimationClass(opts.parentElement, animationClass, opts.navDirection);
opts.enteringElement.addClass('ng-enter');
// start the animations
if(opts.leavingElement) {

View File

@@ -85,7 +85,7 @@
<script id="contact.html" type="text/ng-template">
<view hide-back-button="true">
<content has-header="true" padding="true">
<p>The view's title is blank on purpose.</p>
<p>The views title is blank on purpose.</p>
<p>The hideBackButton attribute is "true" for this view.</p>
<p>@drifty</p>
<p class="text-center">
@@ -188,6 +188,7 @@
<button ng-click="hideBackButton()">Hide Back Button</button>
<button ng-click="showBackButton()">Show Back Button</button>
</p>
<p><a class="button" href="#/tabs/autos">Auto List</a></p>
<p>
Current View: {{ $viewHistory.currentView }}<br>
Back View: {{ $viewHistory.backView }}<br>

View File

@@ -93,6 +93,10 @@ body, .ionic-body {
position: absolute;
z-index: $z-index-scroll-bar;
}
// hide the scroll-bar during animations
.ng-animate .scroll-bar {
visibility: hidden;
}
.scroll-bar-h {
height: 3px;
left: 2px;