diff options
author | Armen Kesablyan | 2012-06-08 11:29:13 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-08 11:29:13 -0700 |
commit | 6a27268ebf1cd5fa7bf8313eb5712fd5f6985758 (patch) | |
tree | 3f2b11529d8384ee7348152844e723a29a0f2df1 /js/stage/binding-view.reel/binding-view.js | |
parent | 7e66e84d1ee4d1816c811b8eb6f236f97cf8224b (diff) | |
download | ninja-6a27268ebf1cd5fa7bf8313eb5712fd5f6985758.tar.gz |
Render Hud Multiple
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/stage/binding-view.reel/binding-view.js')
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.js | 34 |
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 | ||