aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/objects-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/objects-controller.js')
-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 fd9b12f4..f700c03c 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 : {