diff options
Diffstat (limited to 'js/stage')
-rw-r--r-- | js/stage/objects-tray.reel/objects-tray.html | 8 | ||||
-rw-r--r-- | js/stage/objects-tray.reel/objects-tray.js | 23 |
2 files changed, 23 insertions, 8 deletions
diff --git a/js/stage/objects-tray.reel/objects-tray.html b/js/stage/objects-tray.reel/objects-tray.html index 710e3edf..5a0db85e 100644 --- a/js/stage/objects-tray.reel/objects-tray.html +++ b/js/stage/objects-tray.reel/objects-tray.html | |||
@@ -39,7 +39,13 @@ | |||
39 | "bindings": { | 39 | "bindings": { |
40 | "sourceObject" : {"<-": "@repetition.objectAtCurrentIteration"}, | 40 | "sourceObject" : {"<-": "@repetition.objectAtCurrentIteration"}, |
41 | "identifier" : {"<-": "@repetition.objectAtCurrentIteration.identifier"} | 41 | "identifier" : {"<-": "@repetition.objectAtCurrentIteration.identifier"} |
42 | } | 42 | }, |
43 | "listeners": [ | ||
44 | { | ||
45 | "type": "click", | ||
46 | "listener": {"@": "owner"} | ||
47 | } | ||
48 | ] | ||
43 | } | 49 | } |
44 | 50 | ||
45 | } | 51 | } |
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 : { |