From 7e08bdbd9db21880783b56a31b480ba33f3b5327 Mon Sep 17 00:00:00 2001 From: Armen Kesablyan Date: Thu, 16 Feb 2012 11:33:18 -0800 Subject: Tool Button Fixes Signed-off-by: Armen Kesablyan --- js/components/layout/subtool-button.reel/subtool-button.html | 7 ++----- js/components/layout/subtool-button.reel/subtool-button.js | 10 +++------- js/ninja.reel/ninja.html | 3 --- 3 files changed, 5 insertions(+), 15 deletions(-) (limited to 'js') diff --git a/js/components/layout/subtool-button.reel/subtool-button.html b/js/components/layout/subtool-button.reel/subtool-button.html index 9dad007d..24fce57c 100644 --- a/js/components/layout/subtool-button.reel/subtool-button.html +++ b/js/components/layout/subtool-button.reel/subtool-button.html @@ -16,8 +16,7 @@ "module": "js/components/layout/subtool-button.reel", "name": "SubToolButton", "properties": { - "element": {"#": "buttonBackground"}, - "button": {"#": "toolBarButton"} + "element": {"#": "toolButton"} } } } @@ -26,9 +25,7 @@ -
-
-
+
diff --git a/js/components/layout/subtool-button.reel/subtool-button.js b/js/components/layout/subtool-button.reel/subtool-button.js index d1adca43..2b066f24 100644 --- a/js/components/layout/subtool-button.reel/subtool-button.js +++ b/js/components/layout/subtool-button.reel/subtool-button.js @@ -35,7 +35,7 @@ exports.SubToolButton = Montage.create(Component, { boundObjectPropertyPath: "selected", oneway: false }); - + this.element.classList.add(this.data.id); } }, @@ -43,13 +43,9 @@ exports.SubToolButton = Montage.create(Component, { enumerable: false, value: function() { if(this._selected) { - this.element.classList.add( "buttonSelected" ); - this.button.classList.remove( this.data.id + "Unpressed" ); - this.button.classList.add( this.data.id + "Pressed" ); + this.element.classList.add("active"); } else { - this.element.classList.remove( "buttonSelected" ); - this.button.classList.remove( this.data.id + "Pressed" ); - this.button.classList.add( this.data.id + "Unpressed" ); + this.element.classList.remove("active"); } } }, diff --git a/js/ninja.reel/ninja.html b/js/ninja.reel/ninja.html index c8625159..1db5373e 100644 --- a/js/ninja.reel/ninja.html +++ b/js/ninja.reel/ninja.html @@ -340,9 +340,6 @@
- - -
-- cgit v1.2.3