aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorValerio Virgillito2012-02-24 10:15:08 -0800
committerValerio Virgillito2012-02-24 10:15:08 -0800
commit3cf5f167c1d19b28306f30060266c10cda226ea9 (patch)
treef11f3b66c5ad0ffa40a54106f06491a487f1455b /js
parentdb2fd02a1b0e909bb536fa63cefd2144f4642ead (diff)
parent6ad427c4975b9a30f87dfb8ad53614cd4b6e65b9 (diff)
downloadninja-3cf5f167c1d19b28306f30060266c10cda226ea9.tar.gz
Merge pull request #68 from mqg734/ToolFixes
Tool fixes - Adding back the InkBottle tool. Also Fixed some typos in 3d helper classes.
Diffstat (limited to 'js')
-rwxr-xr-xjs/data/tools-data.js22
-rwxr-xr-xjs/helper-classes/3D/LinePlaneIntersectRec.js3
-rwxr-xr-xjs/helper-classes/3D/hit-record.js6
-rwxr-xr-xjs/mediators/keyboard-mediator.js4
4 files changed, 15 insertions, 20 deletions
diff --git a/js/data/tools-data.js b/js/data/tools-data.js
index 00de9236..cf48757d 100755
--- a/js/data/tools-data.js
+++ b/js/data/tools-data.js
@@ -153,21 +153,21 @@ exports.ToolsData = Montage.create(Montage, {
153 "action": "FillTool", 153 "action": "FillTool",
154 "toolTip": "Fill Tool", 154 "toolTip": "Fill Tool",
155 "cursor": "url('images/tools/bucket_down.png'), default", 155 "cursor": "url('images/tools/bucket_down.png'), default",
156 "lastInGroup": false,
157 "container": false,
158 "selected": false
159 },
160 {
161 "id": "InkBottleTool",
162 "properties": "inkbottleProperties",
163 "spriteSheet": true,
164 "action": "InkBottleTool",
165 "toolTip": "Ink Bottle Tool",
166 "cursor": "url('images/tools/inkbottle_down.png'), default",
156 "lastInGroup": true, 167 "lastInGroup": true,
157 "container": false, 168 "container": false,
158 "selected": false 169 "selected": false
159 }, 170 },
160// {
161// "id": "InkBottleTool",
162// "properties": "inkbottleProperties",
163// "spriteSheet": true,
164// "action": "InkBottleTool",
165// "toolTip": "Ink Bottle Tool",
166// "cursor": "url('images/tools/inkbottle_down.png'), default",
167// "lastInGroup": false,
168// "container": false,
169// "selected": false
170// },
171 { 171 {
172 "id": "EyedropperTool", 172 "id": "EyedropperTool",
173 "properties": "eyedropperProperties", 173 "properties": "eyedropperProperties",
diff --git a/js/helper-classes/3D/LinePlaneIntersectRec.js b/js/helper-classes/3D/LinePlaneIntersectRec.js
index e075dd3d..cb172bf7 100755
--- a/js/helper-classes/3D/LinePlaneIntersectRec.js
+++ b/js/helper-classes/3D/LinePlaneIntersectRec.js
@@ -42,9 +42,6 @@ var LinePlaneIntersectRec = exports.LinePlaneIntersectRec = Object.create(Object
42 setDeltaVis: { value: function(d) { this._deltaVis = d; } }, 42 setDeltaVis: { value: function(d) { this._deltaVis = d; } },
43 getDeltaVis: { value: function() { return this._deltaVis; } }, 43 getDeltaVis: { value: function() { return this._deltaVis; } },
44 44
45 getElementPlanes: { value: function() { return this._deltaVis; } },
46 setElementPlanes: { value: function(p) { this._elementPlanes = p; } },
47
48 setNext: { value: function(n) { this._next = n; } }, 45 setNext: { value: function(n) { this._next = n; } },
49 getNext: { value: function() { return this._next; } }, 46 getNext: { value: function() { return this._next; } },
50 47
diff --git a/js/helper-classes/3D/hit-record.js b/js/helper-classes/3D/hit-record.js
index 5546cc5a..2c60adc6 100755
--- a/js/helper-classes/3D/hit-record.js
+++ b/js/helper-classes/3D/hit-record.js
@@ -139,12 +139,10 @@ var HitRecord = exports.HitRecord = Object.create(Object.prototype,
139 139
140 isSomeGridTypeSnap : { 140 isSomeGridTypeSnap : {
141 value: function() { 141 value: function() {
142 return 142 return ((this._type == this.SNAP_TYPE_GRID_VERTEX) ||
143 (
144 (this._type == this.SNAP_TYPE_GRID_VERTEX) ||
145 (this._type == this.SNAP_TYPE_GRID_HORIZONTAL) || 143 (this._type == this.SNAP_TYPE_GRID_HORIZONTAL) ||
146 (this._type == this.SNAP_TYPE_GRID_VERTICAL) 144 (this._type == this.SNAP_TYPE_GRID_VERTICAL)
147 ) 145 );
148 } 146 }
149 }, 147 },
150 148
diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js
index a4bf9baa..5b044f8a 100755
--- a/js/mediators/keyboard-mediator.js
+++ b/js/mediators/keyboard-mediator.js
@@ -165,14 +165,14 @@ exports.KeyboardMediator = Montage.create(Component, {
165 // Hand tool 165 // Hand tool
166 if(evt.keyCode === Keyboard.H ) { 166 if(evt.keyCode === Keyboard.H ) {
167 evt.preventDefault(); 167 evt.preventDefault();
168 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[13]}); 168 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]});
169 return; 169 return;
170 } 170 }
171 171
172 // Zoom tool 172 // Zoom tool
173 if(evt.keyCode === Keyboard.Z ) { 173 if(evt.keyCode === Keyboard.Z ) {
174 evt.preventDefault(); 174 evt.preventDefault();
175 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[14]}); 175 this.application.ninja.handleSelectTool({"detail": this.application.ninja.toolsData.defaultToolsData[15]});
176 return; 176 return;
177 } 177 }
178 178