aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.css5
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.html47
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js16
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.css5
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html55
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.js26
-rw-r--r--js/tools/bindingTool.js21
7 files changed, 173 insertions, 2 deletions
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
new file mode 100755
index 00000000..018448f1
--- /dev/null
+++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.css
@@ -0,0 +1,5 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
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
new file mode 100755
index 00000000..73252de4
--- /dev/null
+++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html
@@ -0,0 +1,47 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8<head>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="binding-view.css">
11
12 <script type="text/montage-serialization">
13 {
14 "owner": {
15 "prototype": "js/stage/binding-view.reel/binding-hud.reel",
16 "properties": {
17 "element": {"#": "bindingHud"}
18 }
19 },
20 "repeater": {
21 "prototype": "montage/ui/repetition.reel",
22 "properties": {
23 "element": {"#": "hudRepetition"}
24 },
25 "bindings": {
26 "objects": {
27 "boundObject": {"@": "owner"},
28 "boundObjectPropertyPath": "bindables",
29 "oneway": true
30 }
31 }
32 },
33 }
34 </script>
35
36</head>
37<body>
38
39
40 <section data-montage-id="bindingHud" class="bindingHud">
41 <div data-montage-id="hudRepetition" class="hudRepetition">
42
43 </div>
44 </section>
45
46</body>
47</html>
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
new file mode 100755
index 00000000..cbb4c1d7
--- /dev/null
+++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.js
@@ -0,0 +1,16 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7/**
8@requires montage/core/core
9@requires montage/ui/component
10*/
11var Montage = require("montage/core/core").Montage,
12 Component = require("montage/ui/component").Component;
13
14exports.bindingHud = Montage.create(Component, {
15
16}); \ No newline at end of file
diff --git a/js/stage/binding-view.reel/binding-view.css b/js/stage/binding-view.reel/binding-view.css
new file mode 100755
index 00000000..018448f1
--- /dev/null
+++ b/js/stage/binding-view.reel/binding-view.css
@@ -0,0 +1,5 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html
new file mode 100755
index 00000000..e3495542
--- /dev/null
+++ b/js/stage/binding-view.reel/binding-view.html
@@ -0,0 +1,55 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8<head>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="binding-view.css">
11
12 <script type="text/montage-serialization">
13 {
14 "owner": {
15 "prototype": "js/stage/binding-view.reel",
16 "properties": {
17 "element": {"#": "bindingView"}
18 }
19 },
20 "repeater": {
21 "prototype": "montage/ui/repetition.reel",
22 "properties": {
23 "element": {"#": "hudRepetition"}
24 },
25 "bindings": {
26 "objects": {
27 "boundObject": {"@": "owner"},
28 "boundObjectPropertyPath": "bindables",
29 "oneway": true
30 }
31 }
32 },
33 "hud": {
34 "prototype": "js/stage/binding-view.reel/binding-hud.reel",
35 "properties": {
36 "element": {"#" : "hud"}
37 }
38 }
39 }
40 </script>
41
42</head>
43<body>
44
45
46 <section data-montage-id="bindingView" class="bindingView">
47 <div data-montage-id="hudRepetition" class="hudRepetition">
48 <div data-montage-id="hud">
49
50 </div>
51 </div>
52 </section>
53
54</body>
55</html>
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js
new file mode 100755
index 00000000..4daa85b3
--- /dev/null
+++ b/js/stage/binding-view.reel/binding-view.js
@@ -0,0 +1,26 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7/**
8@requires montage/core/core
9@requires montage/ui/component
10*/
11var Montage = require("montage/core/core").Montage,
12 Component = require("montage/ui/component").Component;
13
14exports.bindingView = Montage.create(Component, {
15 _bindables: {
16 value: []
17 },
18 bindables: {
19 get: function() {
20 return this._bindables;
21 },
22 set: function(val) {
23 this._bindables = val;
24 }
25 }
26}); \ No newline at end of file
diff --git a/js/tools/bindingTool.js b/js/tools/bindingTool.js
index 1a8cb47f..5953c409 100644
--- a/js/tools/bindingTool.js
+++ b/js/tools/bindingTool.js
@@ -7,6 +7,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 DrawingTool = require("js/tools/drawing-tool").DrawingTool, 8 DrawingTool = require("js/tools/drawing-tool").DrawingTool,
9ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase; 9ModifierToolBase = require("js/tools/modifier-tool-base").ModifierToolBase;
10SelectionTool = require("js/tools/SelectionTool").SelectionTool;
10 11
11 12
12exports.BindingTool = Montage.create(ModifierToolBase, { 13exports.BindingTool = Montage.create(ModifierToolBase, {
@@ -44,8 +45,24 @@ exports.BindingTool = Montage.create(ModifierToolBase, {
44 45
45 HandleLeftButtonUp: { 46 HandleLeftButtonUp: {
46 value: function(event) { 47 value: function(event) {
47 this.endDraw(event); 48
48 NJevent("disableStageMove"); 49 if(this._escape) {
50 this._escape = false;
51 return;
52 }
53
54 if(this._hasDraw) {
55 this._hasDraw = false;
56 this.endDraw(event);
57 } else {
58 this.doSelection(event);
59 if (this.application.ninja.selectedElements.length !== 0 ) {
60 this.selectedElement = this.application.ninja.selectedElements[0];
61 }
62 this._isDrawing = false;
63 }
64 //this.endDraw(event);
65 //NJevent("disableStageMove");
49 } 66 }
50 } 67 }
51}); \ No newline at end of file 68}); \ No newline at end of file