Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created April 17, 2013 02:16
Show Gist options
  • Save eduardolundgren/5401292 to your computer and use it in GitHub Desktop.
Save eduardolundgren/5401292 to your computer and use it in GitHub Desktop.
Widget transition
_afterUiSetVisible: function(val) {
var instance = this,
boundingBox = instance.get('boundingBox'),
transition = instance.get('transition');
// if (!transition) {
boundingBox.setStyle('display', val ? 'block' : 'none');
return;
// }
boundingBox.setStyles({
display: 'block',
opacity: val ? 0 : 1
});
A.mix(transition, {
opacity: val ? 1 : 0
});
boundingBox.transition(transition, function() {
boundingBox.setStyle('display', val ? 'block' : 'none');
});
// if (val) {
// boundingBox.show();
// }
// else {
// boundingBox.hide();
// }
// boundingBox.setStyles({
// display: 'block'
// display: val ? 'block' : 'none'
// });
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment