mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
remove flicker before back view transition
This commit is contained in:
4
dist/css/ionic.css
vendored
4
dist/css/ionic.css
vendored
@@ -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;
|
||||
|
||||
4
dist/css/ionic.min.css
vendored
4
dist/css/ionic.min.css
vendored
File diff suppressed because one or more lines are too long
3
dist/js/ionic-angular.js
vendored
3
dist/js/ionic-angular.js
vendored
@@ -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) {
|
||||
|
||||
2
dist/js/ionic-angular.min.js
vendored
2
dist/js/ionic-angular.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/ionic.min.js
vendored
4
dist/js/ionic.min.js
vendored
File diff suppressed because one or more lines are too long
3
js/ext/angular/src/service/ionicView.js
vendored
3
js/ext/angular/src/service/ionicView.js
vendored
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user