mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-17 02:24:12 +02:00
ESC key for zoom out
This commit is contained in:
@@ -50,7 +50,8 @@ export default class Zoom {
|
||||
onKeyDown(event) {
|
||||
if ( !this.isZoomed_ && Keys.MINUS.includes( event.which ) ) {
|
||||
this.zoomIn();
|
||||
} else if ( this.isZoomed_ && Keys.PLUS.includes( event.which ) ) {
|
||||
} else if ( this.isZoomed_ &&
|
||||
(Keys.PLUS.includes( event.which ) || event.which == Keys.ESCAPE ) ) {
|
||||
this.zoomOut();
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,8 @@ const Keys = {
|
||||
RIGHT: 39,
|
||||
DOWN: 40,
|
||||
PLUS: [107, 171],
|
||||
MINUS: [109, 173]
|
||||
MINUS: [109, 173],
|
||||
ESCAPE: 27
|
||||
};
|
||||
|
||||
export default Keys;
|
||||
|
@@ -573,7 +573,8 @@ var Keys = {
|
||||
RIGHT: 39,
|
||||
DOWN: 40,
|
||||
PLUS: [107, 171],
|
||||
MINUS: [109, 173]
|
||||
MINUS: [109, 173],
|
||||
ESCAPE: 27
|
||||
};
|
||||
|
||||
/* harmony default export */ __webpack_exports__["a"] = (Keys);
|
||||
@@ -2567,7 +2568,7 @@ var Zoom = function () {
|
||||
value: function onKeyDown(event) {
|
||||
if (!this.isZoomed_ && __WEBPACK_IMPORTED_MODULE_1__utils_keys__["a" /* default */].MINUS.includes(event.which)) {
|
||||
this.zoomIn();
|
||||
} else if (this.isZoomed_ && __WEBPACK_IMPORTED_MODULE_1__utils_keys__["a" /* default */].PLUS.includes(event.which)) {
|
||||
} else if (this.isZoomed_ && (__WEBPACK_IMPORTED_MODULE_1__utils_keys__["a" /* default */].PLUS.includes(event.which) || event.which == __WEBPACK_IMPORTED_MODULE_1__utils_keys__["a" /* default */].ESCAPE)) {
|
||||
this.zoomOut();
|
||||
}
|
||||
}
|
||||
|
2
static/js/webslides.min.js
vendored
2
static/js/webslides.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user