diff options
Diffstat (limited to 'js/stage/objects-tray.reel/objects-tray.js')
-rw-r--r-- | js/stage/objects-tray.reel/objects-tray.js | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/js/stage/objects-tray.reel/objects-tray.js b/js/stage/objects-tray.reel/objects-tray.js index 3872c8b6..360d6037 100644 --- a/js/stage/objects-tray.reel/objects-tray.js +++ b/js/stage/objects-tray.reel/objects-tray.js | |||
@@ -66,10 +66,7 @@ exports.ObjectsTray = Montage.create(Component, { | |||
66 | return true; | 66 | return true; |
67 | } | 67 | } |
68 | 68 | ||
69 | var isComponent = this.application.ninja.objectsController._hasPrototype(obj, "Component"), | 69 | return this.application.ninja.objectsController.isOffStageObject(obj); |
70 | hasValidElement = obj.element && obj.element.parentNode; | ||
71 | |||
72 | return !isComponent || !hasValidElement; | ||
73 | } | 70 | } |
74 | }, | 71 | }, |
75 | 72 | ||
@@ -85,6 +82,15 @@ exports.ObjectsTray = Montage.create(Component, { | |||
85 | } | 82 | } |
86 | }, | 83 | }, |
87 | 84 | ||
85 | displayHUDForObject : { | ||
86 | value: function(object) { | ||
87 | this.parentComponent.boundComponents.push(object); | ||
88 | } | ||
89 | }, | ||
90 | |||
91 | /* --------------------- | ||
92 | Draw Cycle | ||
93 | --------------------- */ | ||
88 | 94 | ||
89 | templateDidLoad: { | 95 | templateDidLoad: { |
90 | value: function() { | 96 | value: function() { |
@@ -107,12 +113,15 @@ exports.ObjectsTray = Montage.create(Component, { | |||
107 | "oneway": true | 113 | "oneway": true |
108 | }); | 114 | }); |
109 | 115 | ||
116 | } | ||
117 | }, | ||
118 | willDraw : { | ||
119 | value: function() { | ||
110 | if(this.objects) { | 120 | if(this.objects) { |
111 | this.empty = !this.objects.length; | 121 | this._empty = !this.offStageObjectsController.organizedObjects.length; |
112 | } else { | 122 | } else { |
113 | this.empty = true; | 123 | this._empty = true; |
114 | } | 124 | } |
115 | |||
116 | } | 125 | } |
117 | }, | 126 | }, |
118 | draw : { | 127 | draw : { |