add more linter warnings

This commit is contained in:
JFH
2021-05-14 23:28:12 +02:00
parent 1bad5b9037
commit 8b82f1b4d5
9 changed files with 29 additions and 23 deletions

View File

@@ -173,7 +173,7 @@ class LayersPanel {
"change",
this.lmenuFunc.bind(this)
);
$id("se-cmenu-layers-list").addEventListener("change", e => {
$id("se-cmenu-layers-list").addEventListener("change", (e) => {
this.lmenuFunc(e);
});
$id("sidepanel_handle").addEventListener(
@@ -183,7 +183,7 @@ class LayersPanel {
if (this.editor.configObj.curConfig.showlayers) {
this.toggleSidePanel();
}
$id("sidepanel_handle").addEventListener("mousedown", evt => {
$id("sidepanel_handle").addEventListener("mousedown", (evt) => {
this.sidedrag = evt.pageX;
window.addEventListener("mousemove", this.resizeSidePanel.bind(this));
this.allowmove = false;
@@ -192,14 +192,14 @@ class LayersPanel {
this.allowmove = true;
}, 20);
});
$id("sidepanel_handle").addEventListener("mouseup", _evt => {
$id("sidepanel_handle").addEventListener("mouseup", (_evt) => {
if (!this.sidedragging) {
this.toggleSidePanel();
}
this.sidedrag = -1;
this.sidedragging = false;
});
window.addEventListener("mouseup", _evt => {
window.addEventListener("mouseup", (_evt) => {
this.sidedrag = -1;
this.sidedragging = false;
$id("svg_editor").removeEventListener(
@@ -353,7 +353,7 @@ class LayersPanel {
}
if (layerNameToHighlight) {
curNames.forEach(curName => {
curNames.forEach((curName) => {
if (curName !== layerNameToHighlight) {
this.editor.svgCanvas
.getCurrentDrawing()
@@ -361,7 +361,7 @@ class LayersPanel {
}
});
} else {
curNames.forEach(curName => {
curNames.forEach((curName) => {
this.editor.svgCanvas.getCurrentDrawing().setLayerOpacity(curName, 1.0);
});
}

View File

@@ -28,7 +28,7 @@ class LeftPanel {
updateLeftPanel(button) {
if (button.disabled) return false;
// remove the pressed state on other(s) button(s)
$qa("#tools_left *[pressed]").forEach(b => {
$qa("#tools_left *[pressed]").forEach((b) => {
b.pressed = false;
});
// pressed state for the clicked button

View File

@@ -152,7 +152,7 @@ class TopPanel {
* @returns {void}
*/
updateContextPanel() {
const setInputWidth = elem => {
const setInputWidth = (elem) => {
const w = Math.min(Math.max(12 + elem.value.length * 6, 50), 300);
elem.style.width = w + 'px';
};
@@ -313,7 +313,7 @@ class TopPanel {
const curPanel = panels[tagName];
$id(tagName + "_panel").style.display = 'block';
curPanel.forEach(item => {
curPanel.forEach((item) => {
let attrVal = elem.getAttribute(item);
if (this.editor.configObj.curConfig.baseUnit !== "px" && elem[item]) {
const bv = elem[item].baseVal.value;
@@ -1040,7 +1040,7 @@ class TopPanel {
"click",
this.clickGroup.bind(this)
);
$id("tool_position").addEventListener("change", evt =>
$id("tool_position").addEventListener("change", (evt) =>
this.clickAlignEle.bind(this)(evt)
);
$id("tool_align_left").addEventListener("click", () =>
@@ -1130,7 +1130,7 @@ class TopPanel {
"image_height",
"path_node_x",
"path_node_y"
].forEach(attrId =>
].forEach((attrId) =>
$id(attrId).addEventListener("change", this.attrChanger.bind(this))
);
}