mirror of
https://github.com/webslides/WebSlides.git
synced 2025-09-03 10:02:58 +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;
|
||||
|
Reference in New Issue
Block a user