mirror of
https://github.com/webslides/WebSlides.git
synced 2025-08-12 08:04:14 +02:00
Parens normalisation
This commit is contained in:
@@ -110,6 +110,7 @@
|
|||||||
"space-before-blocks": 2,
|
"space-before-blocks": 2,
|
||||||
"space-before-function-paren": [2, "never"],
|
"space-before-function-paren": [2, "never"],
|
||||||
"spaced-comment": [2, "always"],
|
"spaced-comment": [2, "always"],
|
||||||
|
"space-in-parens": [2, "never"],
|
||||||
|
|
||||||
// ECMAScript 6
|
// ECMAScript 6
|
||||||
// http://eslint.org/docs/rules/#ecmascript-6
|
// http://eslint.org/docs/rules/#ecmascript-6
|
||||||
|
@@ -48,10 +48,10 @@ export default class Zoom {
|
|||||||
* @param {Event} event Key down event
|
* @param {Event} event Key down event
|
||||||
*/
|
*/
|
||||||
onKeyDown(event) {
|
onKeyDown(event) {
|
||||||
if ( !this.isZoomed_ && Keys.MINUS.includes( event.which ) ) {
|
if (!this.isZoomed_ && Keys.MINUS.includes(event.which)) {
|
||||||
this.zoomIn();
|
this.zoomIn();
|
||||||
} else if ( this.isZoomed_ &&
|
} else if (this.isZoomed_ &&
|
||||||
(Keys.PLUS.includes( event.which ) || event.which == Keys.ESCAPE ) ) {
|
(Keys.PLUS.includes(event.which) || event.which === Keys.ESCAPE)) {
|
||||||
this.zoomOut();
|
this.zoomOut();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,7 +79,7 @@ export default class Zoom {
|
|||||||
DOM.after(this.zws_.el, this.ws_.el);
|
DOM.after(this.zws_.el, this.ws_.el);
|
||||||
|
|
||||||
// Creates the container for each slide
|
// Creates the container for each slide
|
||||||
this.zws_.slides.forEach( elem => this.createSlideBlock_(elem));
|
this.zws_.slides.forEach(elem => this.createSlideBlock_(elem));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -195,7 +195,7 @@ export default class Zoom {
|
|||||||
onWindowResize(ev) {
|
onWindowResize(ev) {
|
||||||
if (this.isZoomed_) this.zoomOut();
|
if (this.isZoomed_) this.zoomOut();
|
||||||
|
|
||||||
this.zws_.slides.forEach( elem => {
|
this.zws_.slides.forEach(elem => {
|
||||||
const wrap = elem.el.parentElement;
|
const wrap = elem.el.parentElement;
|
||||||
const div = wrap.parentElement;
|
const div = wrap.parentElement;
|
||||||
this.setSizes_(div, wrap, elem);
|
this.setSizes_(div, wrap, elem);
|
||||||
|
@@ -188,7 +188,7 @@ export default class DOM {
|
|||||||
* @return {integer} The property without the units
|
* @return {integer} The property without the units
|
||||||
*/
|
*/
|
||||||
static parseSize(prop) {
|
static parseSize(prop) {
|
||||||
return Number( prop.replace( /[^\d\.]/g, '' ) );
|
return Number(prop.replace(/[^\d\.]/g, ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user