From b7e739311d9ddeb99029313cae9395878c7f7706 Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Mon, 18 Jun 2012 13:23:05 -0700 Subject: Binding - Show tray when there are objects. Edit binding view css update. --- js/stage/objects-tray.reel/objects-tray.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'js/stage/objects-tray.reel/objects-tray.js') 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, exports.ObjectsTray = Montage.create(Component, { hideClass : { value: 'hide-objects-tray'}, + _empty : { value: null }, _workspaceMode : { value: null }, workspaceMode : { get : function() { return this._workspaceMode; }, @@ -76,11 +77,17 @@ exports.ObjectsTray = Montage.create(Component, { "oneway": true }); + if(this.objects) { + this.empty = !this.objects.length; + } else { + this.empty = true; + } + } }, draw : { value: function() { - if(this.hide) { + if(this.hide || this._empty) { this.element.classList.add(this.hideClass); } else { this.element.classList.remove(this.hideClass); -- cgit v1.2.3