1
0
mirror of https://github.com/moparisthebest/app-UI synced 2025-03-11 06:50:24 -04:00

ui tweaks

re-added jquery animation event handlers instead of timeouts (the old
code is still there incase of issues)
This commit is contained in:
Andrew Trice 2012-05-29 21:11:37 -04:00
parent 586b4d7293
commit 84b6a580e3

View File

@ -175,6 +175,7 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
this.headerContent.css( "opacity", 0 ); this.headerContent.css( "opacity", 0 );
this.header.append( this.headerContent ); this.header.append( this.headerContent );
var func = this.animationCompleteHandler(this.contentPendingRemove, this.headerContentPendingRemove, this.headerContent, this.contentViewHolder );
this.contentPendingRemove.animate({ this.contentPendingRemove.animate({
left:this.contentViewHolder.width(), left:this.contentViewHolder.width(),
@ -194,7 +195,7 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
opacity:0, opacity:0,
avoidTransforms:false, avoidTransforms:false,
useTranslate3d: true useTranslate3d: true
}, this.animationDuration ); }, this.animationDuration, func );
this.headerContent.animate({ this.headerContent.animate({
left:0, left:0,
@ -205,8 +206,8 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
//using a timeout to get around inconsistent response times for webkittransitionend event //using a timeout to get around inconsistent response times for webkittransitionend event
var func = this.animationCompleteHandler(this.contentPendingRemove, this.headerContentPendingRemove, this.headerContent, this.contentViewHolder ); //var func = this.animationCompleteHandler(this.contentPendingRemove, this.headerContentPendingRemove, this.headerContent, this.contentViewHolder );
setTimeout( func, this.animationDuration+90 ); //setTimeout( func, this.animationDuration+90 );
} }
else if ( this.history.length > 1 ) { else if ( this.history.length > 1 ) {
@ -219,6 +220,8 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
this.headerContent.css( "opacity", 0 ); this.headerContent.css( "opacity", 0 );
this.header.append( this.headerContent ); this.header.append( this.headerContent );
var func = this.animationCompleteHandler(this.contentPendingRemove, this.headerContentPendingRemove, this.headerContent, this.contentViewHolder );
this.contentViewHolder.animate({ this.contentViewHolder.animate({
left:0, left:0,
avoidTransforms:false, avoidTransforms:false,
@ -229,7 +232,7 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
left:-this.contentViewHolder.width()/2, left:-this.contentViewHolder.width()/2,
avoidTransforms:false, avoidTransforms:false,
useTranslate3d: true useTranslate3d: true
}, this.animationDuration); }, this.animationDuration, func);
this.headerContent.animate({ this.headerContent.animate({
left:0, left:0,
@ -246,8 +249,8 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
}, this.animationDuration ); }, this.animationDuration );
//using a timeout to get around inconsistent response times for webkittransitionend event //using a timeout to get around inconsistent response times for webkittransitionend event
var func = this.animationCompleteHandler(this.contentPendingRemove, this.headerContentPendingRemove, this.headerContent, this.contentViewHolder ); //var func = this.animationCompleteHandler(this.contentPendingRemove, this.headerContentPendingRemove, this.headerContent, this.contentViewHolder );
setTimeout( func, this.animationDuration+90 ); //setTimeout( func, this.animationDuration+90 );
} }
else { else {
this.contentViewHolder.css( "left", 0 ); this.contentViewHolder.css( "left", 0 );
@ -262,7 +265,11 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
} }
if ( viewDescriptor.backLabel ) { if ( viewDescriptor.backLabel ) {
//new NoClickDelay( this.headerBacklink.get()[0] ); new NoClickDelay( this.headerBacklink.get()[0] );
}
if ( viewDescriptor.showCallback ) {
viewDescriptor.showCallback();
} }
} }