Skip to content

Commit

Permalink
use Modalbox.animating rather than this.animating
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Auty committed Aug 21, 2010
1 parent 36f2ace commit f886ea2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modalbox.js
Expand Up @@ -194,8 +194,8 @@ Modalbox.Methods = {
var newWidth = wWidth + byWidth;
this.options.width = newWidth;
if(options) this.setOptions(options); // Passing callbacks
if(this.options.transitions && !this.animating) {
this.animating = true;
if(this.options.transitions && !Modalbox.animating) {
Modalbox.animating = true;
new Effect.Morph(this.MBwindow, {
style: "width:" + newWidth + "px; height:" + newHeight + "px;",
duration: this.options.resizeDuration,
Expand All @@ -206,7 +206,7 @@ Modalbox.Methods = {
fx.element.setStyle({overflow:"visible"});
this.event("_afterResize"); // Passing internal callback
this.event("afterResize"); // Passing callback
this.animating = false;
Modalbox.animating = false;
}.bind(this)
});
} else {
Expand Down Expand Up @@ -248,7 +248,7 @@ Modalbox.Methods = {
imageincomplete = true;
}
});
if (imageincomplete || this.animating) {
if (imageincomplete || Modalbox.animating) {
// some image hasn't been rendered yet, trigger resize loop until it is
Modalbox.resizeToContent();
}
Expand Down

0 comments on commit f886ea2

Please sign in to comment.