From 20ea3997661b068fc6628ffa573e1b2d47e3a800 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Tue, 19 Jun 2012 22:51:04 -0700 Subject: Binding View - Mouse Over Element Pop up Hud Signed-off-by: Armen Kesablyan --- .../binding-hud.reel/binding-hud.html | 2 +- .../binding-hud.reel/binding-hud.js | 39 +++++++--------------- 2 files changed, 13 insertions(+), 28 deletions(-) (limited to 'js/stage/binding-view.reel/binding-hud.reel') 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 index b8410f9b..82686c7f 100755 --- a/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html +++ b/js/stage/binding-view.reel/binding-hud.reel/binding-hud.html @@ -33,7 +33,7 @@ "element": {"#" : "hudOption"} }, "bindings": { - "hudOptions": {"<-": "@repeater.objectAtCurrentIteration"} + "title": {"<-": "@repeater.objectAtCurrentIteration"} } }, "resizer1": { 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 a8c3ae68..b03c5a06 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 @@ -25,35 +25,19 @@ exports.BindingHud = Montage.create(Component, { get: function() { return this._userComponent; }, - set: function(val) { - this._userComponent = val; - } - }, - - - bindingArgs: { - get: function() { - return this._bindingArgs; - }, set: function(val) { if (typeof(val) !== "undefined") { - this._bindingArgs = val; - this.userComponent = this.bindingArgs.component; - this.title = this.bindingArgs.component.identifier; - this.x = this._bindingArgs.component.element.offsetLeft; - this.y = this._bindingArgs.component.element.offsetTop; - this.properties = this._bindingArgs.properties; + this._userComponent = val; + this.title = val.identifier; + this.x = val.element.offsetLeft; + this.y = val.element.offsetTop; + this.properties = this.application.ninja.objectsController.getPropertiesFromObject(val, true); this.needsDraw = true; - } else { - this.properties = []; } } }, - properties: { - value: [ - ] - }, + properties: { value: [] }, _isResizing: { value: null @@ -149,19 +133,20 @@ exports.BindingHud = Montage.create(Component, { // } // this.properties.push({"title":obj, "bound": objBound}); // }.bind(this)); + this.parentComponent.parentComponent.handleShowBinding(this.application.ninja.objectsController.getObjectBindings(this.userComponent)); } }, draw: { value: function() { this.titleElement.innerHTML = this.title; - -// if(this.isResizing) { -// this.timelineSplitter.collapsed = this.height - this._resizedHeight < 46; -// this.panelSplitter.collapsed = this.width - this._resizedWidth < 30; -// } this.element.style.top = (this.y + this._resizedY) + "px"; this.element.style.left = (this.x + this._resizedX) + "px"; } + }, + didDraw: { + value: function() { + + } } }); \ No newline at end of file -- cgit v1.2.3