fix: eslint no-shadow errors

This commit is contained in:
Aimekram 2022-10-16 16:04:37 +02:00
parent 6a93a2eb29
commit 832b9eaf4d
30 changed files with 273 additions and 271 deletions

View file

@ -4,6 +4,17 @@ import '../emby-input/emby-input';
/* eslint-disable indent */
function calculateOffset(textarea) {
const style = window.getComputedStyle(textarea, null);
const props = ['paddingTop', 'paddingBottom'];
let offset = 0;
for (let i = 0; i < props.length; i++) {
offset += parseInt(style[props[i]]);
}
return offset;
}
function autoGrow(textarea, maxLines) {
const self = this;
@ -16,16 +27,7 @@ import '../emby-input/emby-input';
* @param textarea
* @returns {number}
*/
self.getOffset = function (textarea) {
const style = window.getComputedStyle(textarea, null);
const props = ['paddingTop', 'paddingBottom'];
let offset = 0;
for (let i = 0; i < props.length; i++) {
offset += parseInt(style[props[i]]);
}
return offset;
};
self.getOffset = calculateOffset(textarea);
let offset;
function reset() {