From e1f83a2c603bf9ddb74889f7ba5b697bb474edaa Mon Sep 17 00:00:00 2001 From: Eric Guzman Date: Thu, 28 Jun 2012 11:00:18 -0700 Subject: Binding HUD - Updated CSS for hud and promoted/bound properties. --- .../binding-hud-option.reel/binding-hud-option.js | 30 ++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js') diff --git a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js index fb0fd57e..a7fbb297 100755 --- a/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js +++ b/js/stage/binding-view.reel/binding-hud-option.reel/binding-hud-option.js @@ -26,8 +26,28 @@ exports.BindingHudOption = Montage.create(Component, { } }, - bound: { - value: false + _promoted : { value: null }, + promoted : { + get : function() { return this._promoted; }, + set : function(value) { + if(value === this._promoted) { return; } + + this._promoted = value; + + this.needsDraw = true; + } + }, + + _bound : { value: null }, + bound : { + get : function() { return this._bound; }, + set : function(value) { + if(value === this._bound) { return; } + + this._bound = value; + + this.needsDraw = true; + } }, prepareForDraw: { @@ -47,6 +67,12 @@ exports.BindingHudOption = Montage.create(Component, { } else { this.element.classList.remove("bound"); } + + if(this.promoted || this.bound) { + this.element.classList.add("promoted"); + } else { + this.element.classList.remove("promoted"); + } // if(this.bindings.length > 0) { // this.element.classList.add("bound"); // } else { -- cgit v1.2.3