aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html4
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js31
-rw-r--r--js/tools/bindingTool.js2
3 files changed, 34 insertions, 3 deletions
diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html
index 39704e25..0f01e9ff 100755
--- a/js/stage/binding-view.reel/binding-view.html
+++ b/js/stage/binding-view.reel/binding-view.html
@@ -15,7 +15,8 @@
15 "prototype": "js/stage/binding-view.reel", 15 "prototype": "js/stage/binding-view.reel",
16 "properties": { 16 "properties": {
17 "element": {"#": "bindingView"}, 17 "element": {"#": "bindingView"},
18 "hudRepeater": {"@": "hudRepeater"} 18 "hudRepeater": {"@": "hudRepeater"},
19 "bindingViewCanvas": {"#": "bindingViewCanvas"}
19 } 20 }
20 }, 21 },
21 "hudRepeater": { 22 "hudRepeater": {
@@ -76,6 +77,7 @@
76 77
77 </div> 78 </div>
78 </div> 79 </div>
80 <canvas data-montage-id="bindingViewCanvas" class="bindingViewCanvas"></canvas>
79 </section> 81 </section>
80 82
81</body> 83</body>
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js
index a0ca0c4f..90e6a5e3 100755
--- a/js/stage/binding-view.reel/binding-view.js
+++ b/js/stage/binding-view.reel/binding-view.js
@@ -23,6 +23,10 @@ exports.BindingView = Montage.create(Component, {
23 value:[] 23 value:[]
24 }, 24 },
25 25
26 _bindingViewCanvas: {
27 value:null
28 },
29
26 //Public Objects 30 //Public Objects
27 hudRepeater: { value: null }, 31 hudRepeater: { value: null },
28 32
@@ -53,9 +57,19 @@ exports.BindingView = Montage.create(Component, {
53 this._nonVisualComponents = val; 57 this._nonVisualComponents = val;
54 } 58 }
55 }, 59 },
60 bindingViewCanvas: {
61 get: function() {
62 return this._bindingViewCanvas;
63 },
64 set: function(val) {
65 this._bindingViewCanvas = val;
66 }
67 },
56 68
57 //Methods 69 //Methods
58 70
71
72
59 //Montage Draw Cycle 73 //Montage Draw Cycle
60 prepareForDraw: { 74 prepareForDraw: {
61 value: function() { 75 value: function() {
@@ -70,7 +84,10 @@ exports.BindingView = Montage.create(Component, {
70 { 84 {
71 "title": "Input1", 85 "title": "Input1",
72 "properties": [ 86 "properties": [
73 {"title":"Value"}, 87 {"title":"Value",
88 "bindings": [
89 {"direction": "<-", "boundObject":"Checkbox1", "boundProperty": "Value"}
90 ]},
74 {"title": "Width"} 91 {"title": "Width"}
75 ], 92 ],
76 "x": 20, 93 "x": 20,
@@ -92,6 +109,18 @@ exports.BindingView = Montage.create(Component, {
92 } 109 }
93 }, 110 },
94 111
112 drawBlueLine: {
113 value: function(fromX,fromY,toX,toY) {
114
115 }
116 },
117
118 handleMousedown: {
119 value: function(event) {
120 debugger;
121 }
122 },
123
95 didDraw: { 124 didDraw: {
96 value: function() { 125 value: function() {
97 126
diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js
index 1430e090..a467ed3e 100644
--- a/js/tools/bindingTool.js
+++ b/js/tools/bindingTool.js
@@ -20,7 +20,6 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
20 { 20 {
21 NJevent("enableStageMove"); 21 NJevent("enableStageMove");
22 this.application.ninja.workspaceMode = "binding"; 22 this.application.ninja.workspaceMode = "binding";
23
24 } 23 }
25 else 24 else
26 { 25 {
@@ -33,6 +32,7 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
33 HandleLeftButtonDown: { 32 HandleLeftButtonDown: {
34 value: function(event) { 33 value: function(event) {
35 NJevent("enableStageMove"); 34 NJevent("enableStageMove");
35 this.application.ninja.stage.bindingView.handleMouseDown(event);
36 } 36 }
37 }, 37 },
38 38