aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorEric Guzman2012-06-11 10:27:49 -0700
committerEric Guzman2012-06-11 10:27:49 -0700
commita9a6d479e4f00134b32f7c3e657de3ce5cfb0c48 (patch)
treea23d8251de71e94e6d1e8c698e94319f4194d941 /js/controllers
parentdbb36888eda1f25387852ea79aef89d22dfd7799 (diff)
downloadninja-a9a6d479e4f00134b32f7c3e657de3ce5cfb0c48.tar.gz
Objects Panel - Add component icon and icons by type
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/objects-controller.js28
1 files changed, 17 insertions, 11 deletions
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js
index 2ce10e82..93f78efc 100644
--- a/js/controllers/objects-controller.js
+++ b/js/controllers/objects-controller.js
@@ -119,20 +119,11 @@ var objectsController = exports.ObjectsController = Montage.create(Component, {
119 } 119 }
120 }, 120 },
121 121
122 /* ---- Bindable Properties ---- */ 122 /* ---- Get Bindable Properties ---- */
123 123
124 getPropertyList : { 124 getPropertyList : {
125 value: function(object, excludeUnderscoreProperties) { 125 value: function(object, excludeUnderscoreProperties) {
126 var object_i = object, 126 return this.getPrototypes(object).map(function(proto) {
127 prototypes = [object_i];
128
129 ///// Collect prototypes
130 while(Object.getPrototypeOf(object_i)) {
131 object_i = Object.getPrototypeOf(object_i);
132 prototypes.push(object_i);
133 }
134
135 return prototypes.map(function(proto) {
136 127
137 var metadata = proto._montage_metadata, 128 var metadata = proto._montage_metadata,
138 objectName = (metadata) ? metadata.objectName : "Object"; 129 objectName = (metadata) ? metadata.objectName : "Object";
@@ -166,6 +157,21 @@ var objectsController = exports.ObjectsController = Montage.create(Component, {
166 } 157 }
167 }, 158 },
168 159
160 getPrototypes : {
161 value: function(object) {
162 var object_i = object,
163 prototypes = [object_i];
164
165 ///// Collect prototypes
166 while(Object.getPrototypeOf(object_i)) {
167 object_i = Object.getPrototypeOf(object_i);
168 prototypes.push(object_i);
169 }
170
171 return prototypes;
172 }
173 },
174
169 /* ---- Bindable controller properties ---- */ 175 /* ---- Bindable controller properties ---- */
170 176
171 currentObjectBindings : { 177 currentObjectBindings : {