diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/controllers/objects-controller.js | 6 | ||||
-rwxr-xr-x | js/document/templates/html/index.html | 5 | ||||
-rwxr-xr-x | js/ninja.reel/ninja.html | 5 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.html | 36 | ||||
-rwxr-xr-x | js/stage/binding-view.reel/binding-view.js | 10 |
5 files changed, 52 insertions, 10 deletions
diff --git a/js/controllers/objects-controller.js b/js/controllers/objects-controller.js index 70a3974c..543aa96f 100644 --- a/js/controllers/objects-controller.js +++ b/js/controllers/objects-controller.js | |||
@@ -16,12 +16,6 @@ var objectsController = exports.ObjectsController = Montage.create(Component, { | |||
16 | value: function() { | 16 | value: function() { |
17 | ///// Bind app's activeDocument property to | 17 | ///// Bind app's activeDocument property to |
18 | ///// objects controller's _activeDocument property | 18 | ///// objects controller's _activeDocument property |
19 | |||
20 | Object.defineBinding(this, "activeDocument", { | ||
21 | boundObject: this.application.ninja, | ||
22 | boundObjectPropertyPath: "currentDocument", | ||
23 | oneway: true | ||
24 | }); | ||
25 | } | 19 | } |
26 | }, | 20 | }, |
27 | 21 | ||
diff --git a/js/document/templates/html/index.html b/js/document/templates/html/index.html index 933df157..1bd3da1b 100755 --- a/js/document/templates/html/index.html +++ b/js/document/templates/html/index.html | |||
@@ -67,7 +67,10 @@ | |||
67 | <script type="text/montage-serialization" data-ninja-template="true"> | 67 | <script type="text/montage-serialization" data-ninja-template="true"> |
68 | { | 68 | { |
69 | "owner": { | 69 | "owner": { |
70 | "prototype": "main" | 70 | "prototype": "main", |
71 | "properties": { | ||
72 | "identifier": "testOwner" | ||
73 | } | ||
71 | } | 74 | } |
72 | } | 75 | } |
73 | </script> | 76 | </script> |
diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index 12dbf660..1f0582b1 100755 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html | |||
@@ -324,7 +324,10 @@ | |||
324 | }, | 324 | }, |
325 | 325 | ||
326 | "objectsController" : { | 326 | "objectsController" : { |
327 | "prototype": "js/controllers/objects-controller" | 327 | "prototype": "js/controllers/objects-controller", |
328 | "bindings": { | ||
329 | "activeDocument": {"<-": "@owner.currentDocument"} | ||
330 | } | ||
328 | }, | 331 | }, |
329 | 332 | ||
330 | "owner": { | 333 | "owner": { |
diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html index e3495542..43fa0112 100755 --- a/js/stage/binding-view.reel/binding-view.html +++ b/js/stage/binding-view.reel/binding-view.html | |||
@@ -14,10 +14,11 @@ | |||
14 | "owner": { | 14 | "owner": { |
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 | } | 19 | } |
19 | }, | 20 | }, |
20 | "repeater": { | 21 | "hudRepeater": { |
21 | "prototype": "montage/ui/repetition.reel", | 22 | "prototype": "montage/ui/repetition.reel", |
22 | "properties": { | 23 | "properties": { |
23 | "element": {"#": "hudRepetition"} | 24 | "element": {"#": "hudRepetition"} |
@@ -35,6 +36,37 @@ | |||
35 | "properties": { | 36 | "properties": { |
36 | "element": {"#" : "hud"} | 37 | "element": {"#" : "hud"} |
37 | } | 38 | } |
39 | }, | ||
40 | "nonVisualRepeater": { | ||
41 | "prototype": "montage/ui/repetition.reel", | ||
42 | "properties": { | ||
43 | "element": {"#": "nonVisualRepeater"} | ||
44 | }, | ||
45 | "bindings": { | ||
46 | "objects": { | ||
47 | "boundObject": {"@": "owner"}, | ||
48 | "boundObjectPropertyPath": "nonVisualComponents", | ||
49 | "oneway": true | ||
50 | } | ||
51 | } | ||
52 | }, | ||
53 | "nonVisualComponent": { | ||
54 | "prototype": "js/stage/binding-view.reel/non-visual-component.reel", | ||
55 | "properties": { | ||
56 | "element": {"#": "nonVisualComponent"} | ||
57 | }, | ||
58 | "bindings": { | ||
59 | "objectName": { | ||
60 | "boundObject": {"@": "hudRepetition"}, | ||
61 | "boundObjectPropertyPath": "objectAtCurrentIteration.objectName", | ||
62 | "oneway": true | ||
63 | }, | ||
64 | "objectImage": { | ||
65 | "boundObject": {"@": "undoList"}, | ||
66 | "boundObjectPropertyPath": "objectAtCurrentIteration.objectImage", | ||
67 | "oneway": true | ||
68 | } | ||
69 | } | ||
38 | } | 70 | } |
39 | } | 71 | } |
40 | </script> | 72 | </script> |
diff --git a/js/stage/binding-view.reel/binding-view.js b/js/stage/binding-view.reel/binding-view.js index 4daa85b3..d3d988c1 100755 --- a/js/stage/binding-view.reel/binding-view.js +++ b/js/stage/binding-view.reel/binding-view.js | |||
@@ -22,5 +22,15 @@ exports.bindingView = Montage.create(Component, { | |||
22 | set: function(val) { | 22 | set: function(val) { |
23 | this._bindables = val; | 23 | this._bindables = val; |
24 | } | 24 | } |
25 | }, | ||
26 | |||
27 | |||
28 | nonVisualComponents: { | ||
29 | get: function() { | ||
30 | return this._bindables; | ||
31 | }, | ||
32 | set: function(val) { | ||
33 | this._bindables = val; | ||
34 | } | ||
25 | } | 35 | } |
26 | }); \ No newline at end of file | 36 | }); \ No newline at end of file |