Skip to content

Instantly share code, notes, and snippets.

@ispyinternet
Last active August 29, 2015 14:04
Show Gist options
  • Save ispyinternet/2a985ee6590ddc2ef3ec to your computer and use it in GitHub Desktop.
Save ispyinternet/2a985ee6590ddc2ef3ec to your computer and use it in GitHub Desktop.
extend app transitions
Y.mix(Y.Transition.fx, {
'app:slideUp': {
duration : .6,
transform: 'translateY(-100%)',
on: {
start: function () {
this.setStyles({
opacity : 1,
transform: 'translateY(0%)'
});
},
end: function () {
this.setStyle('transform', 'translateY(0)');
}
}
},
'app:slideDown': {
duration : .6,
transform: 'translateY(0)',
on: {
start: function () {
this.setStyles({
opacity : 1,
transform: 'translateY(-100%)'
});
},
end: function () {
this.setStyle('transform', 'translateY(0)');
}
}
}
}
,true)
Y.mix(Y.App.Transitions.FX, {
"slideUp" : {
viewIn : "app:slideUp",
viewOut : "app:slideUp"
},
"slideDown" : {
viewIn : "app:slideDown",
viewOut : "app:slideDown"
}
},true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment