Skip to content

Commit

Permalink
released v3.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Feb 11, 2019
1 parent d5f9360 commit d211bcf
Show file tree
Hide file tree
Showing 7 changed files with 282 additions and 147 deletions.
7 changes: 4 additions & 3 deletions dist/hotkeys.common.js
@@ -1,5 +1,5 @@
/*!
* hotkeys-js v3.4.3
* hotkeys-js v3.4.4
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2019 kenny wong <wowohoo@qq.com>
Expand Down Expand Up @@ -242,9 +242,10 @@ function unbind(key, scope, method) {
for (var r = 0; r < _handlers[key].length; r++) {
obj = _handlers[key][r];
// 通过函数判断,是否解除绑定,函数相等直接返回
if (method && obj.method !== method) return;
var isMatchingMethod = method ? obj.method === method : true;

// 判断是否在范围内并且键值相同
if (obj.scope === scope && compareArray(obj.mods, mods)) {
if (isMatchingMethod && obj.scope === scope && compareArray(obj.mods, mods)) {
_handlers[key][r] = {};
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/hotkeys.common.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions dist/hotkeys.esm.js
@@ -1,5 +1,5 @@
/*!
* hotkeys-js v3.4.3
* hotkeys-js v3.4.4
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2019 kenny wong <wowohoo@qq.com>
Expand Down Expand Up @@ -240,9 +240,10 @@ function unbind(key, scope, method) {
for (var r = 0; r < _handlers[key].length; r++) {
obj = _handlers[key][r];
// 通过函数判断,是否解除绑定,函数相等直接返回
if (method && obj.method !== method) return;
var isMatchingMethod = method ? obj.method === method : true;

// 判断是否在范围内并且键值相同
if (obj.scope === scope && compareArray(obj.mods, mods)) {
if (isMatchingMethod && obj.scope === scope && compareArray(obj.mods, mods)) {
_handlers[key][r] = {};
}
}
Expand Down
7 changes: 4 additions & 3 deletions dist/hotkeys.js
@@ -1,5 +1,5 @@
/*!
* hotkeys-js v3.4.3
* hotkeys-js v3.4.4
* A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
*
* Copyright (c) 2019 kenny wong <wowohoo@qq.com>
Expand Down Expand Up @@ -246,9 +246,10 @@
for (var r = 0; r < _handlers[key].length; r++) {
obj = _handlers[key][r];
// 通过函数判断,是否解除绑定,函数相等直接返回
if (method && obj.method !== method) return;
var isMatchingMethod = method ? obj.method === method : true;

// 判断是否在范围内并且键值相同
if (obj.scope === scope && compareArray(obj.mods, mods)) {
if (isMatchingMethod && obj.scope === scope && compareArray(obj.mods, mods)) {
_handlers[key][r] = {};
}
}
Expand Down

0 comments on commit d211bcf

Please sign in to comment.