aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/controllers/objects-controller.js2
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js21
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.html2
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js39
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html4
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js189
-rw-r--r--js/tools/bindingTool.js34
7 files changed, 106 insertions, 185 deletions
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js
index 3a6f6e97..b8efd432 100644
--- a/js/controllers/objects-controller.js
+++ b/js/controllers/objects-controller.js
@@ -218,7 +218,7 @@ var objectsController = exports.ObjectsController = Montage.create(Montage, {
218 218
219 if(value) { 219 if(value) {
220 this.currentObjectBindings = this.getObjectBindings(value); 220 this.currentObjectBindings = this.getObjectBindings(value);
221 console.log("Property list", this.getPropertyList(value, true)); 221 //console.log("Property list", this.getPropertyList(value, true));
222 } else { 222 } else {
223 this.currentObjectBindings = []; 223 this.currentObjectBindings = [];
224 } 224 }
diff --git a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js
index 18eb11c9..59e070e8 100755
--- a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js
+++ b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js
@@ -30,27 +30,6 @@ exports.BindingHudOption = Montage.create(Component, {
30 value: false 30 value: false
31 }, 31 },
32 32
33 _hudOptions: {
34 value: []
35 },
36
37 hudOptions: {
38 get: function() {
39 return this._hudOptions;
40 },
41 set: function(val) {
42 if (typeof(val) !== "undefined") {
43 this._hudOptions = val;
44 this.title = val.title;
45 this.bound = val.bound;
46 } else {
47 this._hudOptions = null;
48 }
49 this.needsDraw = true;
50
51 }
52 },
53
54 prepareForDraw: { 33 prepareForDraw: {
55 value: function() { 34 value: function() {
56 // Set Up Listener for click and propagate up to Binding View 35 // Set Up Listener for click and propagate up to Binding View
diff --git a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html
index b8410f9b..82686c7f 100755
--- a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html
+++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html
@@ -33,7 +33,7 @@
33 "element": {"#" : "hudOption"} 33 "element": {"#" : "hudOption"}
34 }, 34 },
35 "bindings": { 35 "bindings": {
36 "hudOptions": {"<-": "@repeater.objectAtCurrentIteration"} 36 "title": {"<-": "@repeater.objectAtCurrentIteration"}
37 } 37 }
38 }, 38 },
39 "resizer1": { 39 "resizer1": {
diff --git a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js
index a8c3ae68..b03c5a06 100755
--- a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js
+++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js
@@ -26,34 +26,18 @@ exports.BindingHud = Montage.create(Component, {
26 return this._userComponent; 26 return this._userComponent;
27 }, 27 },
28 set: function(val) { 28 set: function(val) {
29 this._userComponent = val;
30 }
31 },
32
33
34 bindingArgs: {
35 get: function() {
36 return this._bindingArgs;
37 },
38 set: function(val) {
39 if (typeof(val) !== "undefined") { 29 if (typeof(val) !== "undefined") {
40 this._bindingArgs = val; 30 this._userComponent = val;
41 this.userComponent = this.bindingArgs.component; 31 this.title = val.identifier;
42 this.title = this.bindingArgs.component.identifier; 32 this.x = val.element.offsetLeft;
43 this.x = this._bindingArgs.component.element.offsetLeft; 33 this.y = val.element.offsetTop;
44 this.y = this._bindingArgs.component.element.offsetTop; 34 this.properties = this.application.ninja.objectsController.getPropertiesFromObject(val, true);
45 this.properties = this._bindingArgs.properties;
46 this.needsDraw = true; 35 this.needsDraw = true;
47 } else {
48 this.properties = [];
49 } 36 }
50 } 37 }
51 }, 38 },
52 39
53 properties: { 40 properties: { value: [] },
54 value: [
55 ]
56 },
57 41
58 _isResizing: { 42 _isResizing: {
59 value: null 43 value: null
@@ -149,19 +133,20 @@ exports.BindingHud = Montage.create(Component, {
149// } 133// }
150// this.properties.push({"title":obj, "bound": objBound}); 134// this.properties.push({"title":obj, "bound": objBound});
151// }.bind(this)); 135// }.bind(this));
136 this.parentComponent.parentComponent.handleShowBinding(this.application.ninja.objectsController.getObjectBindings(this.userComponent));
152 } 137 }
153 }, 138 },
154 139
155 draw: { 140 draw: {
156 value: function() { 141 value: function() {
157 this.titleElement.innerHTML = this.title; 142 this.titleElement.innerHTML = this.title;
158
159// if(this.isResizing) {
160// this.timelineSplitter.collapsed = this.height - this._resizedHeight < 46;
161// this.panelSplitter.collapsed = this.width - this._resizedWidth < 30;
162// }
163 this.element.style.top = (this.y + this._resizedY) + "px"; 143 this.element.style.top = (this.y + this._resizedY) + "px";
164 this.element.style.left = (this.x + this._resizedX) + "px"; 144 this.element.style.left = (this.x + this._resizedX) + "px";
165 } 145 }
146 },
147 didDraw: {
148 value: function() {
149
150 }
166 } 151 }
167}); \ No newline at end of file 152}); \ No newline at end of file
diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html
index 01bc3ff7..9eb338d8 100755
--- a/js/stage/binding-view.reel/binding-view.html
+++ b/js/stage/binding-view.reel/binding-view.html
@@ -25,7 +25,7 @@
25 "element": {"#": "hudRepeater"} 25 "element": {"#": "hudRepeater"}
26 }, 26 },
27 "bindings": { 27 "bindings": {
28 "objects": {"<-": "@owner.bindables"} 28 "objects": {"<-": "@owner.boundComponents"}
29 } 29 }
30 }, 30 },
31 "objectsTray" : { 31 "objectsTray" : {
@@ -40,7 +40,7 @@
40 "element": {"#" : "hud"} 40 "element": {"#" : "hud"}
41 }, 41 },
42 "bindings": { 42 "bindings": {
43 "bindingArgs": {"<-": "@hudRepeater.objectAtCurrentIteration"} 43 "userComponent": {"<-": "@hudRepeater.objectAtCurrentIteration"}
44 }, 44 },
45 "listeners": [ 45 "listeners": [
46 { 46 {
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js
index 8c201ba1..aa690ee6 100755
--- a/js/stage/binding-view.reel/binding-view.js
+++ b/js/stage/binding-view.reel/binding-view.js
@@ -13,42 +13,15 @@ var Montage = require("montage/core/core").Montage,
13 13
14exports.BindingView = Montage.create(Component, { 14exports.BindingView = Montage.create(Component, {
15 //private Properties 15 //private Properties
16 _canvas: { value:null },
17 _context : { value: null },
18 _targetedElement: {value: null},
19 componentsList: { value: {} },
16 20
17 hudRepeater: { 21 hudRepeater: { value: null },
18 value: null
19 },
20 _selectedComponent: {
21 value: null
22 },
23
24 //Move variables
25 _translateX : {
26 value: 0
27 },
28
29 _translateY: {
30 value: 0
31 },
32
33 translateX : {
34 get: function() {
35 return this._translateX;
36 },
37 set: function(val) {
38 this._translateX = val;
39 }
40 },
41
42 translateY: {
43 get: function() {
44 return this._translateY;
45 },
46 set: function(val) {
47 this._translateY = val;
48 }
49 },
50 22
51 _width :{ value: 0 }, 23 //Public Properties