diff options
author | Jonathan Duran | 2012-05-11 14:13:07 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-11 14:13:07 -0700 |
commit | 1e2138fc7d0007b0ad3cb4807dc1c9101190f2f2 (patch) | |
tree | 2563aa7694c3caaf813ca71ef3250b2a76ee0041 /node_modules/montage/ui/loader.reel/loader.js | |
parent | 32257ac142f872d3c1f6c07504bae77ae884ed93 (diff) | |
parent | 6fcaa4e923a19672b5860b4c6f67d836680e7e99 (diff) | |
download | ninja-1e2138fc7d0007b0ad3cb4807dc1c9101190f2f2.tar.gz |
Merge branch 'refs/heads/TimelineUber' into TimelineProps
Diffstat (limited to 'node_modules/montage/ui/loader.reel/loader.js')
-rwxr-xr-x | node_modules/montage/ui/loader.reel/loader.js | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/node_modules/montage/ui/loader.reel/loader.js b/node_modules/montage/ui/loader.reel/loader.js index 941c17da..921c3781 100755 --- a/node_modules/montage/ui/loader.reel/loader.js +++ b/node_modules/montage/ui/loader.reel/loader.js | |||
@@ -438,11 +438,33 @@ exports.Loader = Montage.create(Component, /** @lends module:montage/ui/loader.L | |||
438 | } | 438 | } |
439 | }, | 439 | }, |
440 | 440 | ||
441 | /** | ||
442 | Boolean that specifies whether to remove the loading content when load is completed | ||
443 | */ | ||
444 | removeContentOnLoad: { | ||
445 | value: true | ||
446 | }, | ||
447 | |||
448 | _forceContentRemoval: { | ||
449 | enumerable: false, | ||
450 | value: false | ||
451 | }, | ||
452 | |||
441 | _contentToRemove: { | 453 | _contentToRemove: { |
442 | enumerable: false, | 454 | enumerable: false, |
443 | value: null | 455 | value: null |
444 | }, | 456 | }, |
445 | 457 | ||
458 | /** | ||
459 | Forces a manual removal of loading content | ||
460 | */ | ||
461 | removeContent: { | ||
462 | value: function() { | ||
463 | this._forceContentRemoval = true; | ||
464 | this.needsDraw = true; | ||
465 | } | ||
466 | }, | ||
467 | |||
446 | draw: { | 468 | draw: { |
447 | value: function() { | 469 | value: function() { |
448 | // start loading the mainComponent if we haven't already | 470 | // start loading the mainComponent if we haven't already |
@@ -464,9 +486,11 @@ exports.Loader = Montage.create(Component, /** @lends module:montage/ui/loader.L | |||
464 | this.element.classList.remove(BOOTSTRAPPING_CLASS_NAME); | 486 | this.element.classList.remove(BOOTSTRAPPING_CLASS_NAME); |
465 | this.element.classList.remove(LOADING_CLASS_NAME); | 487 | this.element.classList.remove(LOADING_CLASS_NAME); |
466 | 488 | ||
467 | this._contentToRemove.extractContents(); | 489 | if(this.removeContentOnLoad || this._forceContentRemoval) { |
468 | this._contentToRemove.detach(); | 490 | this._contentToRemove.extractContents(); |
469 | this._contentToRemove = null; | 491 | this._contentToRemove.detach(); |
492 | this._contentToRemove = null; | ||
493 | } | ||
470 | 494 | ||
471 | this.element.classList.add(LOADED_CLASS_NAME); | 495 | this.element.classList.add(LOADED_CLASS_NAME); |
472 | } | 496 | } |