aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-18 20:10:48 -0700
committerArmen Kesablyan2012-06-18 20:10:48 -0700
commit00eb09a626293cb55554e2a8eb7df9a8953b1251 (patch)
treed9b96adefad798e0ce0409d3947e9626ee5e2385 /js/stage
parentb4ab3e558f26549c63fa0d0a542e208d2be62d56 (diff)
parent1b2e102b3519994c79b63be44fccb79cf5712fef (diff)
downloadninja-00eb09a626293cb55554e2a8eb7df9a8953b1251.tar.gz
Merge branch 'binding' of https://github.com/dhg637/ninja-internal into binding
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.css2
-rwxr-xr-xjs/stage/binding-view.reel/binding-view.html14
-rw-r--r--js/stage/objects-tray.reel/objects-tray.js9
3 files changed, 17 insertions, 8 deletions
diff --git a/js/stage/binding-view.reel/binding-view.css b/js/stage/binding-view.reel/binding-view.css
index b6673da1..0365f52d 100755
--- a/js/stage/binding-view.reel/binding-view.css
+++ b/js/stage/binding-view.reel/binding-view.css
@@ -27,7 +27,7 @@
27} 27}
28 28
29.objects-tray-container { 29.objects-tray-container {
30 bottom: 11px; 30 bottom: 10px;
31 position: absolute; 31 position: absolute;
32 width: 100%; 32 width: 100%;
33 display: -webkit-box; 33 display: -webkit-box;
diff --git a/js/stage/binding-view.reel/binding-view.html b/js/stage/binding-view.reel/binding-view.html
index 5532d61a..01bc3ff7 100755
--- a/js/stage/binding-view.reel/binding-view.html
+++ b/js/stage/binding-view.reel/binding-view.html
@@ -28,6 +28,12 @@
28 "objects": {"<-": "@owner.bindables"} 28 "objects": {"<-": "@owner.bindables"}
29 } 29 }
30 }, 30 },
31 "objectsTray" : {
32 "prototype": "js/stage/objects-tray.reel",
33 "properties": {
34 "element": {"#": "objects-tray" }
35 }
36 },
31 "hud": { 37 "hud": {
32 "prototype": "js/stage/binding-view.reel/binding-hud.reel", 38 "prototype": "js/stage/binding-view.reel/binding-hud.reel",
33 "properties": { 39 "properties": {
@@ -42,12 +48,6 @@
42 "listener": {"@": "owner"} 48 "listener": {"@": "owner"}
43 } 49 }
44 ] 50 ]
45 },
46 "objectsTray" : {
47 "prototype": "js/stage/objects-tray.reel",
48 "properties": {
49 "element": {"#": "objects-tray" }
50 }
51 } 51 }
52 } 52 }
53 </script> 53 </script>
@@ -57,6 +57,7 @@
57 57
58 58
59 <section data-montage-id="bindingView" class="bindingView"> 59 <section data-montage-id="bindingView" class="bindingView">
60
60 <div data-montage-id="hudRepeater" class="hudRepeater"> 61 <div data-montage-id="hudRepeater" class="hudRepeater">
61 <div data-montage-id="hud"> 62 <div data-montage-id="hud">
62 63
@@ -66,6 +67,7 @@
66 <div class="objects-tray-container"> 67 <div class="objects-tray-container">
67 <div data-montage-id="objects-tray" ></div> 68 <div data-montage-id="objects-tray" ></div>
68 </div> 69 </div>
70
69 </section> 71 </section>
70 72
71</body> 73</body>
diff --git a/js/stage/objects-tray.reel/objects-tray.js b/js/stage/objects-tray.reel/objects-tray.js
index c046a3bb..190abf57 100644
--- a/js/stage/objects-tray.reel/objects-tray.js
+++ b/js/stage/objects-tray.reel/objects-tray.js
@@ -13,6 +13,7 @@ var Montage = require("montage/core/core").Montage,
13 13
14exports.ObjectsTray = Montage.create(Component, { 14exports.ObjectsTray = Montage.create(Component, {
15 hideClass : { value: 'hide-objects-tray'}, 15 hideClass : { value: 'hide-objects-tray'},
16 _empty : { value: null },
16 _workspaceMode : { value: null }, 17 _workspaceMode : { value: null },
17 workspaceMode : { 18 workspaceMode : {
18 get : function() { return this._workspaceMode; }, 19 get : function() { return this._workspaceMode; },
@@ -76,11 +77,17 @@ exports.ObjectsTray = Montage.create(Component, {
76 "oneway": true 77 "oneway": true
77 }); 78 });
78 79
80 if(this.objects) {
81 this.empty = !this.objects.length;
82 } else {
83 this.empty = true;
84 }
85
79 } 86 }
80 }, 87 },
81 draw : { 88 draw : {
82 value: function() { 89 value: function() {
83 if(this.hide) { 90 if(this.hide || this._empty) {
84 this.element.classList.add(this.hideClass); 91 this.element.classList.add(this.hideClass);
85 } else { 92 } else {
86 this.element.classList.remove(this.hideClass); 93 this.element.classList.remove(this.hideClass);