1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-30 03:30:34 +02:00
This commit is contained in:
Pomax
2016-01-01 21:45:06 -08:00
parent 3ba0ed40ae
commit b609375b73
6 changed files with 397 additions and 399 deletions

View File

@@ -38,14 +38,16 @@ var Flattening = React.createClass({
},
values: {
"+": 1,
"-": -1
"107": 1, // numpad + key
"187": 1, // =/+ main board key
"109": -1, // numpad - key
"189": -1 // -/_ main board key
},
onKeyDown: function(e, api) {
e.preventDefault();
var v = this.values[e.key];
var v = this.values[e.keyCode];
if(v) {
e.preventDefault();
api.steps += v;
if (api.steps < 1) {
api.steps = 1;