aboutsummaryrefslogtreecommitdiff
path: root/js/components/layout/tool-button.reel/tool-button.js
diff options
context:
space:
mode:
authorAnanya Sen2012-02-23 13:52:32 -0800
committerAnanya Sen2012-02-23 13:52:32 -0800
commitec3d07c2fea4e79c68606234074f43d694982e5b (patch)
treedc7c830c361d35c04a4d9b6d55c6c36d7a5d61cd /js/components/layout/tool-button.reel/tool-button.js
parent7283884c39df537694b21419a3ea9e3ca7793b4b (diff)
parent287a0bad5b774a380ec6c8b3ddf24dc03234e248 (diff)
downloadninja-ec3d07c2fea4e79c68606234074f43d694982e5b.tar.gz
Merge branch 'refs/heads/FileIO-jose' into FileIO
Conflicts: js/document/html-document.js js/helper-classes/3D/snap-manager.js Signed-off-by: Ananya Sen <Ananya.Sen@motorola.com>
Diffstat (limited to 'js/components/layout/tool-button.reel/tool-button.js')
-rwxr-xr-xjs/components/layout/tool-button.reel/tool-button.js21
1 files changed, 6 insertions, 15 deletions
diff --git a/js/components/layout/tool-button.reel/tool-button.js b/js/components/layout/tool-button.reel/tool-button.js
index 72f46830..6cea0dc3 100755
--- a/js/components/layout/tool-button.reel/tool-button.js
+++ b/js/components/layout/tool-button.reel/tool-button.js
@@ -11,8 +11,6 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve
11 11
12exports.ToolButton = Montage.create(Component, { 12exports.ToolButton = Montage.create(Component, {
13 13
14 button: { value: null },
15
16 data: { value: null }, 14 data: { value: null },
17 15
18 _selected: { value: null }, 16 _selected: { value: null },
@@ -64,32 +62,25 @@ exports.ToolButton = Montage.create(Component, {
64 oneway: true 62 oneway: true
65 }); 63 });
66 } 64 }
65
66 this.element.classList.add(this.data.id)
67 } 67 }
68 }, 68 },
69 69
70 draw: { 70 draw: {
71 enumerable: false, 71 enumerable: false,
72 value: function() { 72 value: function() {
73 var buttonid;
74
75 if(this.data.container) { 73 if(this.data.container) {
76 buttonid = this.data.subtools[this._subselected].id;
77 this.element.title = this.data.subtools[this._subselected].toolTip; 74 this.element.title = this.data.subtools[this._subselected].toolTip;
78 this.button.classList.remove( this.data.subtools[this._currentSubSelected].id + "Unpressed" ); 75 this.element.classList.remove(this.data.subtools[this._currentSubSelected].id);
79 this.button.classList.remove( this.data.subtools[this._currentSubSelected].id + "Pressed" ); 76 this.element.classList.add(this.data.subtools[this._subselected].id);
80 this._currentSubSelected = this._subselected; 77 this._currentSubSelected = this._subselected;
81 } else {
82 buttonid = this.data.id;
83 } 78 }
84 79
85 if(this._selected) { 80 if(this._selected) {
86 this.element.classList.add( "buttonSelected" ); 81 this.element.classList.add("active");
87 this.button.classList.remove( buttonid + "Unpressed" );
88 this.button.classList.add( buttonid + "Pressed" );
89 } else { 82 } else {
90 this.element.classList.remove( "buttonSelected" ); 83 this.element.classList.remove("active");
91 this.button.classList.remove( buttonid + "Pressed" );
92 this.button.classList.add( buttonid + "Unpressed" );
93 } 84 }
94 } 85 }
95 }, 86 },