diff options
author | John Mayhew | 2012-05-08 07:25:09 -0700 |
---|---|---|
committer | John Mayhew | 2012-05-08 07:25:09 -0700 |
commit | dd663d8fe9191cc57c9cebe6d425562cb45982c2 (patch) | |
tree | e13e2d81d755ac99eede0b8c5aa468f7b32ab38e /js/mediators | |
parent | 1196fcee1c7e5e86edb387cdbc1b08d40926ca15 (diff) | |
download | ninja-dd663d8fe9191cc57c9cebe6d425562cb45982c2.tar.gz |
Removed unused SubSelect Tool
Diffstat (limited to 'js/mediators')
-rwxr-xr-x | js/mediators/keyboard-mediator.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index c647107f..665e3ce7 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js | |||
@@ -110,35 +110,35 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
110 | // Shortcut for Selection Tool is V | 110 | // Shortcut for Selection Tool is V |
111 | if(evt.keyCode === Keyboard.V) { | 111 | if(evt.keyCode === Keyboard.V) { |
112 | evt.preventDefault(); | 112 | evt.preventDefault(); |
113 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[0]}); | 113 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex] }); |
114 | return; | 114 | return; |
115 | } | 115 | } |
116 | 116 | ||
117 | // Shortcut for Tag Tool is D | 117 | // Shortcut for Tag Tool is D |
118 | if(evt.keyCode === Keyboard.D){ | 118 | if(evt.keyCode === Keyboard.D){ |
119 | evt.preventDefault(); | 119 | evt.preventDefault(); |
120 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[4]}); | 120 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.tagToolIndex] }); |
121 | return; | 121 | return; |
122 | } | 122 | } |
123 | 123 | ||
124 | // Shortcut for Rotate Tool is W | 124 | // Shortcut for Rotate Tool is W |
125 | if(evt.keyCode === Keyboard.W){ | 125 | if(evt.keyCode === Keyboard.W){ |
126 | evt.preventDefault(); | 126 | evt.preventDefault(); |
127 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[2]}); | 127 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.rotate3DToolIndex] }); |
128 | return; | 128 | return; |
129 | } | 129 | } |
130 | 130 | ||
131 | // Shortcut for Translate Tool is G | 131 | // Shortcut for Translate Tool is G |
132 | if(evt.keyCode === Keyboard.G){ | 132 | if(evt.keyCode === Keyboard.G){ |
133 | evt.preventDefault(); | 133 | evt.preventDefault(); |
134 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[3]}); | 134 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.translate3DToolIndex] }); |
135 | return; | 135 | return; |
136 | } | 136 | } |
137 | 137 | ||
138 | // shortcut for Pen tool is P | 138 | // shortcut for Pen tool is P |
139 | if (evt.keyCode === Keyboard.P){ | 139 | if (evt.keyCode === Keyboard.P){ |
140 | evt.preventDefault(); | 140 | evt.preventDefault(); |
141 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[5]}); | 141 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.penToolIndex] }); |
142 | return; | 142 | return; |
143 | } | 143 | } |
144 | 144 | ||
@@ -147,24 +147,24 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
147 | // If the user is pressing the command key, they want to refresh the browser. | 147 | // If the user is pressing the command key, they want to refresh the browser. |
148 | if((evt.keyCode === Keyboard.R) && !evt.metaKey) { | 148 | if((evt.keyCode === Keyboard.R) && !evt.metaKey) { |
149 | evt.preventDefault(); | 149 | evt.preventDefault(); |
150 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[7]}); | 150 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.shapeToolIndex] }); |
151 | this.application.ninja.handleSelectSubTool({"detail": this.application.ninja.toolsData.defaultToolsData[7].subtools[1]}); | 151 | this.application.ninja.handleSelectSubTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.shapeToolIndex].subtools[1] }); |
152 | return; | 152 | return; |
153 | } | 153 | } |
154 | 154 | ||
155 | // Shortcut for Oval Tool is O | 155 | // Shortcut for Oval Tool is O |
156 | if(evt.keyCode === Keyboard.O) { | 156 | if(evt.keyCode === Keyboard.O) { |
157 | evt.preventDefault(); | 157 | evt.preventDefault(); |
158 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[7]}); | 158 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.shapeToolIndex] }); |
159 | this.application.ninja.handleSelectSubTool({"detail": this.application.ninja.toolsData.defaultToolsData[7].subtools[0]}); | 159 | this.application.ninja.handleSelectSubTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.shapeToolIndex].subtools[0] }); |
160 | return; | 160 | return; |
161 | } | 161 | } |
162 | 162 | ||
163 | // Shortcut for Line Tool is L | 163 | // Shortcut for Line Tool is L |
164 | if(evt.keyCode === Keyboard.L ) { | 164 | if(evt.keyCode === Keyboard.L ) { |
165 | evt.preventDefault(); | 165 | evt.preventDefault(); |
166 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[7]}); | 166 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.shapeToolIndex] }); |
167 | this.application.ninja.handleSelectSubTool({"detail": this.application.ninja.toolsData.defaultToolsData[7].subtools[2]}); | 167 | this.application.ninja.handleSelectSubTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.shapeToolIndex].subtools[2] }); |
168 | return; | 168 | return; |
169 | } | 169 | } |
170 | 170 | ||
@@ -172,9 +172,9 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
172 | if(evt.keyCode === Keyboard.K ) { | 172 | if(evt.keyCode === Keyboard.K ) { |
173 | evt.preventDefault(); | 173 | evt.preventDefault(); |
174 | if(this.application.ninja.toolsData.selectedTool.id === "FillTool") { | 174 | if(this.application.ninja.toolsData.selectedTool.id === "FillTool") { |
175 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[11]}); | 175 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.fillToolIndex] }); |
176 | } else { | 176 | } else { |
177 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[10]}); | 177 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.inkBottleToolIndex] }); |
178 | } | 178 | } |
179 | return; | 179 | return; |
180 | } | 180 | } |
@@ -182,21 +182,21 @@ exports.KeyboardMediator = Montage.create(Component, { | |||
182 | // Rotate Stage Tool is M | 182 | // Rotate Stage Tool is M |
183 | if(evt.keyCode === Keyboard.M ) { | 183 | if(evt.keyCode === Keyboard.M ) { |
184 | evt.preventDefault(); | 184 | evt.preventDefault(); |
185 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); | 185 | this.application.ninja.handleSelectTool({ "detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.rotateStage3DToolIndex] }); |
186 | return; | 186 | return; |
187 | } | 187 | } |
188 | 188 | ||
189 | // Hand tool | 189 | // Hand tool |
190 | if(evt.keyCode === Keyboard.H ) { | 190 | if(evt.keyCode === Keyboard.H ) { |
191 | evt.preventDefault(); | 191 | evt.preventDefault(); |
192 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); | 192 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.panToolIndex]}); |
193 | return; | 193 | return; |
194 | } | 194 | } |
195 | 195 | ||
196 | // Zoom tool | 196 | // Zoom tool |
197 | if((evt.keyCode === Keyboard.Z) && !(evt.ctrlKey || evt.metaKey) && !evt.shiftKey) {//ctrl or shift key not press with Z | 197 | if((evt.keyCode === Keyboard.Z) && !(evt.ctrlKey || evt.metaKey) && !evt.shiftKey) {//ctrl or shift key not press with Z |
198 | evt.preventDefault(); | 198 | evt.preventDefault(); |
199 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]}); | 199 | this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.zoomToolIndex]}); |
200 | return; | 200 | return; |
201 | } | 201 | } |
202 | 202 | ||