aboutsummaryrefslogtreecommitdiff
path: root/js/stage
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-26 15:15:59 -0700
committerArmen Kesablyan2012-06-26 15:15:59 -0700
commit67a47e519fcf5d6ebd701aee09efd5e32c0aa208 (patch)
tree382971a5615ee202eeb9037a876cae533952b427 /js/stage
parent46174eb0ce93d660c8d2e9276fbdc4f9a03f056a (diff)
downloadninja-67a47e519fcf5d6ebd701aee09efd5e32c0aa208.tar.gz
Binding Hud Not rendering at correct x and y
Signed-off-by: Armen Kesablyan <armen@motorola.com>
Diffstat (limited to 'js/stage')
-rwxr-xr-xjs/stage/binding-view.reel/binding-hud.reel/binding-hud.js17
1 files changed, 12 insertions, 5 deletions
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 9918b06d..85e4b87b 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
@@ -73,12 +73,7 @@ exports.BindingHud = Montage.create(Component, {
73 this.title = icon.name; 73 this.title = icon.name;
74 this.x = iconOffsets.x; 74 this.x = iconOffsets.x;
75 this.y = iconOffsets.y - 80; 75 this.y = iconOffsets.y - 80;
76 } else {
77 this.title = val.identifier;
78 this.x = val.element.offsetLeft;
79 this.y = val.element.offsetTop;
80 } 76 }
81
82 this.needsDraw = true; 77 this.needsDraw = true;
83 78
84 } 79 }
@@ -202,6 +197,12 @@ exports.BindingHud = Montage.create(Component, {
202 this.scrollUp.style.display = "block"; 197 this.scrollUp.style.display = "block";
203 this.scrollDown.style.display = "block"; 198 this.scrollDown.style.display = "block";
204 } 199 }
200 var isOffStage = this.application.ninja.objectsController.isOffStageObject(this.userComponent);
201 if(!isOffStage) {
202 this.title = this.userComponent.identifier;
203 this.x = this.userComponent.element.offsetLeft;
204 this.y = this.userComponent.element.offsetTop;
205 }
205 } 206 }
206 }, 207 },
207 208
@@ -289,6 +290,12 @@ exports.BindingHud = Montage.create(Component, {
289 } 290 }
290 }, 291 },
291 292
293 willDraw: {
294 value: function() {
295
296 }
297 },
298
292 draw: { 299 draw: {
293 value: function() { 300 value: function() {
294 this.titleElement.innerHTML = this.title; 301 this.titleElement.innerHTML = this.title;