From 4e7ac23b53b620e990207662670799933caa0a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 31 May 2024 14:55:02 +0200 Subject: [PATCH] refactor(sync): remove formbuilder `this._redraw()` callbacks. They are now handled in the `render()` call, so there is no more need for them here. --- umap/static/umap/js/umap.features.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/umap/static/umap/js/umap.features.js b/umap/static/umap/js/umap.features.js index eb5838a7..f157b6d1 100644 --- a/umap/static/umap/js/umap.features.js +++ b/umap/static/umap/js/umap.features.js @@ -172,7 +172,6 @@ U.FeatureMixin = { properties.unshift('properties.name') builder = new U.FormBuilder(this, properties, { id: 'umap-feature-properties', - callback: this._redraw, // In case we have dynamic options… }) container.appendChild(builder.build()) this.appendEditFieldsets(container) @@ -203,7 +202,6 @@ U.FeatureMixin = { const optionsFields = this.getShapeOptions() let builder = new U.FormBuilder(this, optionsFields, { id: 'umap-feature-shape-properties', - callback: this._redraw, }) const shapeProperties = L.DomUtil.createFieldset(container, L._('Shape properties')) shapeProperties.appendChild(builder.build()) @@ -211,7 +209,6 @@ U.FeatureMixin = { const advancedOptions = this.getAdvancedOptions() builder = new U.FormBuilder(this, advancedOptions, { id: 'umap-feature-advanced-properties', - callback: this._redraw, }) const advancedProperties = L.DomUtil.createFieldset( container, @@ -220,9 +217,7 @@ U.FeatureMixin = { advancedProperties.appendChild(builder.build()) const interactionOptions = this.getInteractionOptions() - builder = new U.FormBuilder(this, interactionOptions, { - callback: this._redraw, - }) + builder = new U.FormBuilder(this, interactionOptions) const popupFieldset = L.DomUtil.createFieldset( container, L._('Interaction options') @@ -778,7 +773,6 @@ U.Marker = L.Marker.extend({ builder.resetField('_latlng.lat') builder.resetField('_latlng.lng') } - this._redraw() this.zoomTo({ easing: false }) }, callbackContext: this,