|
@@ -73,7 +73,19 @@ function MarkBoard(option) {
|
|
|
} else if (code == 80 && this.enableSkip) {
|
|
|
//P键,跳过当前任务
|
|
|
this.markControl.trigger('task.pass.success');
|
|
|
- }else if (code == 37) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.markControl.on('key.up', this, function(e, context, event) {
|
|
|
+ var code = event.keyCode;
|
|
|
+ //console.log('key up:' + code);
|
|
|
+ if (this.currentStep != undefined && this.task != undefined) {
|
|
|
+ if (code == 32) {
|
|
|
+ //空格键提交步骤分
|
|
|
+ this.onNumberSubmit();
|
|
|
+ event.preventDefault();
|
|
|
+ return false;
|
|
|
+ } else if (code == 37) {
|
|
|
//←按键,切换到上一个步骤
|
|
|
if (this.currentStep.number > 1) {
|
|
|
this.resetCurrentStep();
|
|
@@ -92,18 +104,6 @@ function MarkBoard(option) {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- this.markControl.on('key.up', this, function(e, context, event) {
|
|
|
- var code = event.keyCode;
|
|
|
- //console.log('key up:' + code);
|
|
|
- if (this.currentStep != undefined && this.task != undefined) {
|
|
|
- if (code == 32) {
|
|
|
- //空格键提交步骤分
|
|
|
- this.onNumberSubmit();
|
|
|
- event.preventDefault();
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
|
|
|
}
|
|
|
|