public/qunit/qunit.input.js in entityjs-0.4.1 vs public/qunit/qunit.input.js in entityjs-0.4.2
- old
+ new
@@ -1,11 +1,11 @@
/*
EntityJS methods to simulate user inputs.
*/
function _findKeyCode(code){
- var codes = re.c('keyboard').keyCodes;
+ var codes = re.keyboard.keyCodes;
for(var i in codes){
if(codes[i] == code){
return i;
}
@@ -23,11 +23,11 @@
e = e || {};
e.type = 'keydown';
e.keyCode = _findKeyCode(key);
- re.c('keyboard').event(e);
+ re.keyboard.event(e);
};
/*
Calls keyup, even if keydown was not pressed beforehand.
keyup('w');
@@ -36,11 +36,11 @@
e = e || {};
e.type = 'keyup';
e.keyCode = _findKeyCode(key);
- re.c('keyboard').event(e);
+ re.keyboard.event(e);
};
/*
Calls keydown before the callback and then keyup after.
@@ -86,12 +86,12 @@
e.type = type;
e.clientX = x + document.body.scrollLeft + document.documentElement.scrollLeft;
e.clientX = y + document.body.scrollTop + document.documentElement.scrollTop;
if(key){
- re.c('mouse').press(e);
+ re.mouse.press(e);
} else {
- re.c('mouse').event(e);
+ re.mouse.event(e);
}
}
//sim mouse clicks
\ No newline at end of file