aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js4
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.css2
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js9
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js3
4 files changed, 15 insertions, 3 deletions
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 59e070e8..fb0fd57e 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
@@ -33,6 +33,10 @@ exports.BindingHudOption = Montage.create(Component, {
33 prepareForDraw: { 33 prepareForDraw: {
34 value: function() { 34 value: function() {
35 // Set Up Listener for click and propagate up to Binding View 35 // Set Up Listener for click and propagate up to Binding View
36 var matchesBound = this.parentComponent.parentComponent.boundProperties.filter(function(obj) {
37 return (obj === this.title);
38 }.bind(this));
39 if(matchesBound.length > 0) this.bound = true;
36 } 40 }
37 }, 41 },
38 42
diff --git a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css
index 76b8e37e..f15f1e50 100755
--- a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css
+++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css
@@ -46,7 +46,7 @@
46 cursor: pointer; 46 cursor: pointer;
47} 47}
48 48
49.hudOption.bound, .bindingHud .hudOption.bound { 49.bindingHud .hudOption.bound .connectorBubble {
50 background: -webkit-linear-gradient(top, #d0e4f7 0%,#73b1e7 24%,#0a77d5 50%,#539fe1 79%,#87bcea 100%); 50 background: -webkit-linear-gradient(top, #d0e4f7 0%,#73b1e7 24%,#0a77d5 50%,#539fe1 79%,#87bcea 100%);
51} 51}
52 52
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 b03c5a06..fddce11c 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
@@ -20,6 +20,10 @@ exports.BindingHud = Montage.create(Component, {
20 value: null 20 value: null
21 }, 21 },
22 22
23 boundProperties: {
24 value: []
25 },
26
23 _userComponent: { value: null }, 27 _userComponent: { value: null },
24 userComponent: { 28 userComponent: {
25 get: function() { 29 get: function() {
@@ -32,6 +36,9 @@ exports.BindingHud = Montage.create(Component, {
32 this.x = val.element.offsetLeft; 36 this.x = val.element.offsetLeft;
33 this.y = val.element.offsetTop; 37 this.y = val.element.offsetTop;
34 this.properties = this.application.ninja.objectsController.getPropertiesFromObject(val, true); 38 this.properties = this.application.ninja.objectsController.getPropertiesFromObject(val, true);
39 this.application.ninja.objectsController.getObjectBindings(this.userComponent).forEach(function(obj) {
40 this.boundProperties.push(obj.sourceObjectPropertyPath);
41 }.bind(this));
35 this.needsDraw = true; 42 this.needsDraw = true;
36 } 43 }
37 } 44 }
@@ -133,7 +140,7 @@ exports.BindingHud = Montage.create(Component, {
133// } 140// }
134// this.properties.push({"title":obj, "bound": objBound}); 141// this.properties.push({"title":obj, "bound": objBound});
135// }.bind(this)); 142// }.bind(this));
136 this.parentComponent.parentComponent.handleShowBinding(this.application.ninja.objectsController.getObjectBindings(this.userComponent)); 143 //this.parentComponent.parentComponent.handleShowBinding(this.application.ninja.objectsController.getObjectBindings(this.userComponent));
137 } 144 }
138 }, 145 },
139 146
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js
index aa690ee6..a4aebd1b 100755
--- a/js/stage/binding-view.reel/binding-view.js
+++ b/js/stage/binding-view.reel/binding-view.js
@@ -216,6 +216,7 @@ exports.BindingView = Montage.create(Component, {
216 if(width === null) width = 1; 216 if(width === null) width = 1;
217 if (color === null) color = "#CCC"; 217 if (color === null) color = "#CCC";
218 this._context.lineWidth = width; // Set Line Thickness 218 this._context.lineWidth = width; // Set Line Thickness
219 this._context.lineCap = "round";
219 this._context.strokeStyle = color; // Set Color 220 this._context.strokeStyle = color; // Set Color
220 this._context.beginPath(); // Start Drawing Line 221 this._context.beginPath(); // Start Drawing Line
221 this._context.moveTo(fromX, fromY); 222 this._context.moveTo(fromX, fromY);
@@ -294,7 +295,7 @@ exports.BindingView = Montage.create(Component, {
294 if(this._isDrawingConnection && !overHud) { 295 if(this._isDrawingConnection && !overHud) {
295 //NOTE : Continue This content. mouse over select 296 //NOTE : Continue This content. mouse over select
296 var obj = this.application.ninja.stage.getElement(event, true); 297 var obj = this.application.ninja.stage.getElement(event, true);
297 if (obj) 298 if (obj && obj.controller !== this.selectedComponent)
298 { 299 {
299 if (!obj.controller || obj === null) 300 if (!obj.controller || obj === null)
300 { 301 {