app/assets/javascripts/materialize/materialbox.js in materialize-sass-0.98.0 vs app/assets/javascripts/materialize/materialbox.js in materialize-sass-0.98.1
- old
+ new
@@ -233,38 +233,40 @@
left: 0,
top: 0
},
{
duration: outDuration,
- queue: false, easing: 'easeOutQuad'
+ queue: false, easing: 'easeOutQuad',
+ complete: function() {
+ placeholder.css({
+ height: '',
+ width: '',
+ position: '',
+ top: '',
+ left: ''
+ });
+
+ origin.removeAttr('style');
+ origin.attr('style', originInlineStyles);
+
+ // Remove class
+ origin.removeClass('active');
+ doneAnimating = true;
+
+ // Remove overflow overrides on ancestors
+ if (ancestorsChanged) {
+ ancestorsChanged.css('overflow', '');
+ }
+ }
}
);
// Remove Caption + reset css settings on image
$('.materialbox-caption').velocity({opacity: 0}, {
duration: outDuration, // Delay prevents animation overlapping
queue: false, easing: 'easeOutQuad',
complete: function(){
- placeholder.css({
- height: '',
- width: '',
- position: '',
- top: '',
- left: ''
- });
-
- origin.removeAttr('style');
- origin.attr('style', originInlineStyles);
-
- // Remove class
- origin.removeClass('active');
- doneAnimating = true;
$(this).remove();
-
- // Remove overflow overrides on ancestors
- if (ancestorsChanged) {
- ancestorsChanged.css('overflow', '');
- }
}
});
}
});