aboutsummaryrefslogtreecommitdiff
path: root/js/stage/objects-tray.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage/objects-tray.reel')
-rw-r--r--js/stage/objects-tray.reel/objects-tray.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/stage/objects-tray.reel/objects-tray.js b/js/stage/objects-tray.reel/objects-tray.js
index c046a3bb..190abf57 100644
--- a/js/stage/objects-tray.reel/objects-tray.js
+++ b/js/stage/objects-tray.reel/objects-tray.js
@@ -13,6 +13,7 @@ var Montage = require("montage/core/core").Montage,
13 13
14exports.ObjectsTray = Montage.create(Component, { 14exports.ObjectsTray = Montage.create(Component, {
15 hideClass : { value: 'hide-objects-tray'}, 15 hideClass : { value: 'hide-objects-tray'},
16 _empty : { value: null },
16 _workspaceMode : { value: null }, 17 _workspaceMode : { value: null },
17 workspaceMode : { 18 workspaceMode : {
18 get : function() { return this._workspaceMode; }, 19 get : function() { return this._workspaceMode; },
@@ -76,11 +77,17 @@ exports.ObjectsTray = Montage.create(Component, {
76 "oneway": true 77 "oneway": true
77 }); 78 });
78 79
80 if(this.objects) {
81 this.empty = !this.objects.length;
82 } else {
83 this.empty = true;
84 }
85
79 } 86 }
80 }, 87 },
81 draw : { 88 draw : {
82 value: function() { 89 value: function() {
83 if(this.hide) { 90 if(this.hide || this._empty) {
84 this.element.classList.add(this.hideClass); 91 this.element.classList.add(this.hideClass);
85 } else { 92 } else {
86 this.element.classList.remove(this.hideClass); 93 this.element.classList.remove(this.hideClass);