diff options
author | hwc487 | 2012-05-11 13:52:55 -0700 |
---|---|---|
committer | hwc487 | 2012-05-11 13:52:55 -0700 |
commit | 137bfc9d4c41cc918d969565bec28a834fe10472 (patch) | |
tree | e9fa109fc65218f45e386df48b713ff5858f3d62 /node_modules/montage/ui/loader.reel | |
parent | d21aaca3d7093b6af968b7f9f764ab54e004f02b (diff) | |
parent | 27f4cacb39de1c2e3910748dadc9fc16d0655480 (diff) | |
download | ninja-137bfc9d4c41cc918d969565bec28a834fe10472.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Conflicts:
js/lib/geom/geom-obj.js
js/lib/geom/rectangle.js
js/tools/TagTool.js
Diffstat (limited to 'node_modules/montage/ui/loader.reel')
-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 | } |