diff --git a/umap/static/umap/js/modules/help.js b/umap/static/umap/js/modules/help.js index 7bbf66dd..7c33a8dc 100644 --- a/umap/static/umap/js/modules/help.js +++ b/umap/static/umap/js/modules/help.js @@ -213,25 +213,20 @@ export default class Help { this.map.dialog.open({ content: container, className: 'dark' }) } - button(container, entries, classname) { + button(container, entries) { const button = DomUtil.createButton( - classname || 'umap-help-button', + 'umap-help-button', container, translate('Help') ) - entries = typeof entries === 'string' ? [entries] : entries - DomEvent.on(button, 'click', DomEvent.stop).on(button, 'click', () => { - this.show(entries) - }) + button.addEventListener('click', () => this.show(entries)) return button } getStartedLink(container) { const button = DomUtil.createButton('umap-help-link', container, translate('Help')) button.textContent = translate('Help') - DomEvent.on(button, 'click', DomEvent.stop).on(button, 'click', () => { - this.showGetStarted() - }) + button.addEventListener('click', () => this.showGetStarted()) return button } diff --git a/umap/static/umap/js/modules/schema.js b/umap/static/umap/js/modules/schema.js index a818aec9..881fe22c 100644 --- a/umap/static/umap/js/modules/schema.js +++ b/umap/static/umap/js/modules/schema.js @@ -45,7 +45,7 @@ export const SCHEMA = { impacts: ['data'], handler: 'ColorPicker', label: translate('color'), - helpEntries: 'colorValue', + helpEntries: ['colorValue'], inheritable: true, default: 'DarkBlue', }, @@ -65,7 +65,7 @@ export const SCHEMA = { type: String, impacts: ['data'], label: translate('dash array'), - helpEntries: 'dashArray', + helpEntries: ['dashArray'], inheritable: true, }, datalayersControl: { @@ -92,7 +92,7 @@ export const SCHEMA = { type: 'Text', impacts: ['ui'], label: translate('description'), - helpEntries: 'textFormatting', + helpEntries: ['textFormatting'], }, displayOnLoad: { type: Boolean, @@ -131,7 +131,7 @@ export const SCHEMA = { type: Boolean, impacts: ['data'], label: translate('fill'), - helpEntries: 'fill', + helpEntries: ['fill'], inheritable: true, default: true, }, @@ -140,7 +140,7 @@ export const SCHEMA = { impacts: ['data'], handler: 'ColorPicker', label: translate('fill color'), - helpEntries: 'fillColor', + helpEntries: ['fillColor'], inheritable: true, }, fillOpacity: { @@ -216,7 +216,7 @@ export const SCHEMA = { type: Boolean, impacts: ['data'], label: translate('Allow interactions'), - helpEntries: 'interactive', + helpEntries: ['interactive'], inheritable: true, default: true, }, @@ -243,7 +243,7 @@ export const SCHEMA = { labelKey: { type: String, impacts: ['data'], - helpEntries: 'labelKey', + helpEntries: ['labelKey'], placeholder: translate('Default: name'), label: translate('Label key'), inheritable: true, @@ -319,7 +319,7 @@ export const SCHEMA = { type: String, impacts: [], label: translate('Link to…'), - helpEntries: 'outlink', + helpEntries: ['outlink'], placeholder: 'http://...', inheritable: true, }, @@ -441,7 +441,7 @@ export const SCHEMA = { max: 10, step: 0.5, label: translate('Simplify'), - helpEntries: 'smoothFactor', + helpEntries: ['smoothFactor'], inheritable: true, default: 1.0, }, @@ -459,7 +459,7 @@ export const SCHEMA = { type: Boolean, impacts: ['data'], label: translate('stroke'), - helpEntries: 'stroke', + helpEntries: ['stroke'], inheritable: true, default: true, }, @@ -467,7 +467,7 @@ export const SCHEMA = { type: Boolean, impacts: ['sync', 'ui'], label: translate('Enable real-time collaboration'), - helpEntries: 'sync', + helpEntries: ['sync'], default: false, }, tilelayer: { @@ -526,7 +526,7 @@ export const SCHEMA = { type: Number, impacts: [], // not need to update the view placeholder: translate('Inherit'), - helpEntries: 'zoomTo', + helpEntries: ['zoomTo'], label: translate('Default zoom level'), inheritable: true, },