mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Minor simplification.
This commit is contained in:
parent
52edd72efb
commit
0346552bc6
1 changed files with 2 additions and 4 deletions
|
@ -63,8 +63,7 @@ var Key = new function() {
|
|||
// based on whichever key is used for commands.
|
||||
command: {
|
||||
get: function() {
|
||||
var browser = paper.browser;
|
||||
return browser.mac ? this.meta : this.control;
|
||||
return paper.browser.mac ? this.meta : this.control;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -104,8 +103,7 @@ var Key = new function() {
|
|||
// Detect modifiers and mark them as pressed / released
|
||||
if (key.length > 1 && (name = Base.camelize(key)) in modifiers) {
|
||||
modifiers[name] = down;
|
||||
var browser = paper.browser;
|
||||
if (name === 'meta' && browser && browser.mac) {
|
||||
if (name === 'meta' && paper.browser.mac) {
|
||||
// Fix a strange behavior on Mac where no keyup events are
|
||||
// received for any keys pressed while the meta key is down.
|
||||
// Keep track of the normal keys being pressed and trigger keyup
|
||||
|
|
Loading…
Reference in a new issue