From b450acf81d90ccddf0913a7f88e0d0d822c8bace Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Tue, 7 May 2024 12:31:28 +0200 Subject: [PATCH] chore: prettier --- umap/static/umap/js/modules/orderable.js | 2 +- umap/static/umap/js/modules/schema.js | 2 +- umap/static/umap/js/modules/urls.js | 2 +- umap/static/umap/js/umap.controls.js | 7 +++++-- umap/static/umap/js/umap.forms.js | 11 +++++------ umap/static/umap/js/umap.layer.js | 4 ++-- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/umap/static/umap/js/modules/orderable.js b/umap/static/umap/js/modules/orderable.js index 850d0304..60b36012 100644 --- a/umap/static/umap/js/modules/orderable.js +++ b/umap/static/umap/js/modules/orderable.js @@ -33,7 +33,7 @@ export default class Orderable { onDragStart(e) { // e.target is the source node. - const realSrc = document.elementFromPoint(e.clientX, e.clientY); + const realSrc = document.elementFromPoint(e.clientX, e.clientY) // Only allow drag from the handle if (!realSrc.classList.contains('icon-drag')) { e.preventDefault() diff --git a/umap/static/umap/js/modules/schema.js b/umap/static/umap/js/modules/schema.js index e733739b..504708b5 100644 --- a/umap/static/umap/js/modules/schema.js +++ b/umap/static/umap/js/modules/schema.js @@ -83,7 +83,7 @@ export const SCHEMA = { easing: { type: Boolean, impacts: [], - default: false + default: false, }, editinosmControl: { type: Boolean, diff --git a/umap/static/umap/js/modules/urls.js b/umap/static/umap/js/modules/urls.js index ede3ac54..ad834a65 100644 --- a/umap/static/umap/js/modules/urls.js +++ b/umap/static/umap/js/modules/urls.js @@ -1,4 +1,4 @@ -import { template } from "./utils.js" +import { template } from './utils.js' export default class URLs { constructor(serverUrls) { diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index 8948489d..1ec336f2 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -196,8 +196,11 @@ U.ToggleEditAction = U.BaseFeatureAction.extend({ }, onClick: function (e) { - if (this.feature._toggleEditing) this.feature._toggleEditing(e) // Path - else this.feature.edit(e) // Marker + if (this.feature._toggleEditing) { + this.feature._toggleEditing(e) // Path + } else { + this.feature.edit(e) // Marker + } }, }) diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 4098e0ec..9873b7e4 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -878,12 +878,11 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({ }, fetch: function () { - let value = (this.backup = this.toHTML()) - if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) - value = - typeof this.options.default !== 'undefined' - ? this.options.default - : this.default + this.backup = this.toHTML() + let value = this.backup + if (!this.container.querySelector(`input[type="radio"][value="${value}"]`)) { + value = this.options.default !== undefined ? this.options.default : this.default + } this.container.querySelector(`input[type="radio"][value="${value}"]`).checked = true }, diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js index 8a137e8b..fa739e35 100644 --- a/umap/static/umap/js/umap.layer.js +++ b/umap/static/umap/js/umap.layer.js @@ -463,8 +463,8 @@ U.Layer.Heat = L.HeatLayer.extend({ this._latlngs[i].alt !== undefined ? this._latlngs[i].alt : this._latlngs[i][2] !== undefined - ? +this._latlngs[i][2] - : 1 + ? +this._latlngs[i][2] + : 1 grid[y] = grid[y] || [] cell = grid[y][x]