diff options
author | Eric Guzman | 2012-06-18 13:23:05 -0700 |
---|---|---|
committer | Eric Guzman | 2012-06-18 13:23:05 -0700 |
commit | b7e739311d9ddeb99029313cae9395878c7f7706 (patch) | |
tree | b68441b2f383c7b5ea7b5a88b092f8613534e395 /js/stage | |
parent | 39ca897a886ae55d19c8cb3f7b4a0a705b60dc60 (diff) | |
download | ninja-b7e739311d9ddeb99029313cae9395878c7f7706.tar.gz |
Binding - Show tray when there are objects. Edit binding view css update.
Diffstat (limited to 'js/stage')
-rw-r--r-- | js/stage/objects-tray.reel/objects-tray.js | 9 |
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 | ||
14 | exports.ObjectsTray = Montage.create(Component, { | 14 | exports.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); |