From 67a47e519fcf5d6ebd701aee09efd5e32c0aa208 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Tue, 26 Jun 2012 15:15:59 -0700 Subject: Binding Hud Not rendering at correct x and y Signed-off-by: Armen Kesablyan --- .../binding-view.reel/binding-hud.reel/binding-hud.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'js/stage') 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, { this.title = icon.name; this.x = iconOffsets.x; this.y = iconOffsets.y - 80; - } else { - this.title = val.identifier; - this.x = val.element.offsetLeft; - this.y = val.element.offsetTop; } - this.needsDraw = true; } @@ -202,6 +197,12 @@ exports.BindingHud = Montage.create(Component, { this.scrollUp.style.display = "block"; this.scrollDown.style.display = "block"; } + var isOffStage = this.application.ninja.objectsController.isOffStageObject(this.userComponent); + if(!isOffStage) { + this.title = this.userComponent.identifier; + this.x = this.userComponent.element.offsetLeft; + this.y = this.userComponent.element.offsetTop; + } } }, @@ -289,6 +290,12 @@ exports.BindingHud = Montage.create(Component, { } }, + willDraw: { + value: function() { + + } + }, + draw: { value: function() { this.titleElement.innerHTML = this.title; -- cgit v1.2.3