@desynova-digital/player 3.13.19 → 3.13.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Shortcut.js +12 -20
- package/package.json +1 -1
package/components/Shortcut.js
CHANGED
|
@@ -250,7 +250,6 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
250
250
|
keyCode: 73,
|
|
251
251
|
// I Key
|
|
252
252
|
handle: function handle(player, actions) {
|
|
253
|
-
var _args$;
|
|
254
253
|
var _this$props2 = _this.props,
|
|
255
254
|
markers = _this$props2.markers,
|
|
256
255
|
playerType = _this$props2.playerType,
|
|
@@ -264,9 +263,6 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
264
263
|
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
265
264
|
args[_key - 2] = arguments[_key];
|
|
266
265
|
}
|
|
267
|
-
if ((_args$ = args[1]) !== null && _args$ !== void 0 && _args$.ctrlKey) {
|
|
268
|
-
return;
|
|
269
|
-
}
|
|
270
266
|
var isOverLapTime = args[0].timeAfterOverlap;
|
|
271
267
|
if (isOverLapTime) {
|
|
272
268
|
onAddMarker(args[0].timeAfterOverlap, playerSelectedMarker.rightMarker, 'update');
|
|
@@ -314,7 +310,6 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
314
310
|
keyCode: 79,
|
|
315
311
|
// O Key
|
|
316
312
|
handle: function handle(player, actions) {
|
|
317
|
-
var _args$2;
|
|
318
313
|
var _this$props3 = _this.props,
|
|
319
314
|
markers = _this$props3.markers,
|
|
320
315
|
onMarkerSelect = _this$props3.onMarkerSelect,
|
|
@@ -329,9 +324,6 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
329
324
|
for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
|
|
330
325
|
args[_key2 - 2] = arguments[_key2];
|
|
331
326
|
}
|
|
332
|
-
if ((_args$2 = args[1]) !== null && _args$2 !== void 0 && _args$2.ctrlKey) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
327
|
var isOverLapTime = args[0].timeAfterOverlap;
|
|
336
328
|
if (isOverLapTime) {
|
|
337
329
|
var data = {
|
|
@@ -523,22 +515,22 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
523
515
|
key: "componentDidMount",
|
|
524
516
|
value: function componentDidMount() {
|
|
525
517
|
this.mergeShortcuts();
|
|
526
|
-
(0, _hotkeysJs["default"])('
|
|
518
|
+
(0, _hotkeysJs["default"])('o+right,right+o', {
|
|
527
519
|
keyup: true,
|
|
528
520
|
keydown: true
|
|
529
|
-
}, this.
|
|
530
|
-
(0, _hotkeysJs["default"])('
|
|
521
|
+
}, this.threeKeyCombo1);
|
|
522
|
+
(0, _hotkeysJs["default"])('o+left,left+o', {
|
|
531
523
|
keyup: true,
|
|
532
524
|
keydown: true
|
|
533
|
-
}, this.
|
|
534
|
-
(0, _hotkeysJs["default"])('
|
|
525
|
+
}, this.threeKeyCombo2);
|
|
526
|
+
(0, _hotkeysJs["default"])('i+right,right+i', {
|
|
535
527
|
keyup: true,
|
|
536
528
|
keydown: true
|
|
537
|
-
}, this.
|
|
538
|
-
(0, _hotkeysJs["default"])('
|
|
529
|
+
}, this.threeKeyCombo3);
|
|
530
|
+
(0, _hotkeysJs["default"])('i+left,left+i', {
|
|
539
531
|
keyup: true,
|
|
540
532
|
keydown: true
|
|
541
|
-
}, this.
|
|
533
|
+
}, this.threeKeyCombo4);
|
|
542
534
|
document.addEventListener('keydown', this.handleKeyPress);
|
|
543
535
|
document.addEventListener('click', this.handleClick);
|
|
544
536
|
document.addEventListener('dblclick', this.handleDoubleClick);
|
|
@@ -582,10 +574,10 @@ var Shortcut = exports["default"] = /*#__PURE__*/function (_Component) {
|
|
|
582
574
|
}, {
|
|
583
575
|
key: "componentWillUnmount",
|
|
584
576
|
value: function componentWillUnmount() {
|
|
585
|
-
_hotkeysJs["default"].unbind('
|
|
586
|
-
_hotkeysJs["default"].unbind('
|
|
587
|
-
_hotkeysJs["default"].unbind('
|
|
588
|
-
_hotkeysJs["default"].unbind('
|
|
577
|
+
_hotkeysJs["default"].unbind('o+right,right+o');
|
|
578
|
+
_hotkeysJs["default"].unbind('i+right,right+i');
|
|
579
|
+
_hotkeysJs["default"].unbind('i+left,left+i');
|
|
580
|
+
_hotkeysJs["default"].unbind('o+left,left+o');
|
|
589
581
|
document.removeEventListener('keydown', this.handleKeyPress);
|
|
590
582
|
document.removeEventListener('click', this.handleClick);
|
|
591
583
|
document.removeEventListener('dblclick', this.handleDoubleClick);
|