@gamelearn/arcade-components 2.12.8-hotfix-keyboardcontrol-pdf → 2.12.8

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.
@@ -144,7 +144,8 @@ var PdfComponent = function PdfComponent(_ref) {
144
144
  },
145
145
  url: url,
146
146
  endPdf: endPdf,
147
- translate: translate
147
+ translate: translate,
148
+ keyboardControl: keyboardControl
148
149
  }));
149
150
  };
150
151
 
@@ -77,7 +77,8 @@ var PdfVisor = function PdfVisor(_ref) {
77
77
  endPdf = _ref.endPdf,
78
78
  emitNumberOfPages = _ref.emitNumberOfPages,
79
79
  translate = _ref.translate,
80
- soundActions = _ref.soundActions;
80
+ soundActions = _ref.soundActions,
81
+ keyboardControl = _ref.keyboardControl;
81
82
  var scrollElement = (0, _react.useRef)();
82
83
 
83
84
  var _useState = (0, _react.useState)(1),
@@ -167,6 +168,12 @@ var PdfVisor = function PdfVisor(_ref) {
167
168
  }
168
169
  };
169
170
 
171
+ keyboardControl(pages > 1 && currentPage !== 1 ? function () {
172
+ return turnPage(-1);
173
+ } : null, pages > 1 && currentPage !== pages ? function () {
174
+ return turnPage(1);
175
+ } : null);
176
+
170
177
  var removeOverlay = function removeOverlay() {
171
178
  setOverlay(false);
172
179
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "author": "Gamelearn",
4
4
  "license": "unlicense",
5
- "version": "2.12.8-hotfix-keyboardcontrol-pdf",
5
+ "version": "2.12.8",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",