aboutsummaryrefslogtreecommitdiff
path: root/js/stage/binding-view.reel/binding-view.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/stage/binding-view.reel/binding-view.js')
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js34
1 files changed, 28 insertions, 6 deletions
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js
index 1457e2fc..01a71202 100755
--- a/js/stage/binding-view.reel/binding-view.js
+++ b/js/stage/binding-view.reel/binding-view.js
@@ -17,16 +17,22 @@ exports.BindingView = Montage.create(Component, {
17 value: null 17 value: null
18 }, 18 },
19 19
20 //Bindables Format: [ 20 componentsList: {
21 21 value: {}
22 //] 22 },
23
24 /*
25
26 Bindables Format: [
27
28 ]
29 */
23 30
24 31
25 _bindables: { 32 _bindables: {
26 value: [] 33 value: []
27 }, 34 },
28 35
29
30 _nonVisualComponents: { 36 _nonVisualComponents: {
31 value:[] 37 value:[]
32 }, 38 },
@@ -54,12 +60,28 @@ exports.BindingView = Montage.create(Component, {
54 this._selectedComponent = val; 60 this._selectedComponent = val;
55 this.application.ninja.objectsController.currentObject = this.selectedComponent; 61 this.application.ninja.objectsController.currentObject = this.selectedComponent;
56 var arrBindings = this.application.ninja.objectsController.currentObjectBindings; 62 var arrBindings = this.application.ninja.objectsController.currentObjectBindings;
63 var arrProperties = this.application.ninja.objectsController.getPropertyList(this.selectedComponent, true);
57 64
65 //Add the first component which is the selected one to have a hud
58 debugger; 66 debugger;
67 this.componentsList[this.selectedComponent.identifier] = {"component": this.selectedComponent, "properties": this.application.ninja.objectsController.getPropertyList(this.selectedComponent, true)};
68 console.log("components:",this.componentsList);
69 //Go through the loop and find every interacted object by bindings
59 arrBindings.forEach(function(obj) { 70 arrBindings.forEach(function(obj) {
60 71 if(typeof (this.componentsList[obj.boundObject.identifier]) === "undefined") {
72 var componentListItem = {}
73 componentListItem.component = obj.boundObject;
74 componentListItem.properties = [];
75 this.application.ninja.objectsController.getPropertiesFromObject(obj.boundObject, true).forEach(function(obj) {
76 componentListItem.properties.push({"title":obj})
77 }.bind(this));
78 this.componentsList[obj.boundObject.identifier] = componentListItem;
79 }
61 }.bind(this)); 80 }.bind(this));
62 this.bindables.push(this._selectedComponent); 81 for(var key in this.componentsList){
82 this.bindables.push(this.componentsList[key]);
83 }
84 console.log(this.bindables);
63 // Get Bindings that exist; 85 // Get Bindings that exist;
64 86
65 87