diff --git a/umap/static/umap/js/umap.js b/umap/static/umap/js/umap.js index 4626c2d1..bcb244dc 100644 --- a/umap/static/umap/js/umap.js +++ b/umap/static/umap/js/umap.js @@ -1299,11 +1299,13 @@ L.U.Map.include({ 'options.fill', 'options.fillColor', 'options.fillOpacity', + 'options.smoothFactor', + 'options.dashArray', ] builder = new L.U.FormBuilder(this, shapeOptions, { callback: function (e) { - this.eachDataLayer((datalayer) => { + this.eachVisibleDataLayer((datalayer) => { datalayer.redraw() }) }, @@ -1317,8 +1319,6 @@ L.U.Map.include({ _editDefaultProperties: function (container) { const optionsFields = [ - 'options.smoothFactor', - 'options.dashArray', 'options.zoomTo', ['options.easing', { handler: 'Switch', label: L._('Animated transitions') }], 'options.labelKey', @@ -1365,10 +1365,9 @@ L.U.Map.include({ builder = new L.U.FormBuilder(this, optionsFields, { callback: function (e) { this.initCaptionBar() - this.eachDataLayer((datalayer) => { - if (e.helper.field === 'options.sortKey') datalayer.reindex() - datalayer.redraw() - }) + if (e.helper.field === 'options.sortKey') { + this.eachDataLayer((datalayer) => datalayer.reindex()) + } }, }) const defaultProperties = L.DomUtil.createFieldset( @@ -1393,10 +1392,11 @@ L.U.Map.include({ if ( e.helper.field === 'options.popupTemplate' || e.helper.field === 'options.popupContentTemplate' || - e.helper.field === 'options.popupShape' + e.helper.field === 'options.popupShape' || + e.helper.field === 'options.outlinkTarget' ) return - this.eachDataLayer((datalayer) => { + this.eachVisibleDataLayer((datalayer) => { datalayer.redraw() }) },