使用属性来提供运行效率. 防止错误.

pull/7/head
ChenX 7 years ago
parent d1f274fadc
commit a7b086fda5

@ -3,6 +3,7 @@ import { app } from '../../ApplicationServices/Application';
import * as xaop from 'xaop';
import { Editor } from '../../Editor/Editor';
import { IsNumble, IsChar } from '../../Common/Utils';
import { KeyBoardControls } from '../../Editor/KeyBoardControls';
export interface CommandMsg
{
@ -13,7 +14,7 @@ export class CommandStore
{
constructor(ed: Editor)
{
xaop.begin(ed.m_KeyCtrl, ed.m_KeyCtrl.OnKeyDown, (e: KeyboardEvent) =>
xaop.begin(ed.m_KeyCtrl, KeyBoardControls.prototype.OnKeyDown, (e: KeyboardEvent) =>
{
if (IsNumble(e.keyCode) || IsChar(e.keyCode))
{

Loading…
Cancel
Save