umap-project 2.4.0b2__py3-none-any.whl → 2.4.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of umap-project might be problematic. Click here for more details.

Files changed (129) hide show
  1. umap/__init__.py +1 -1
  2. umap/locale/el/LC_MESSAGES/django.po +145 -90
  3. umap/locale/en/LC_MESSAGES/django.po +3 -3
  4. umap/locale/eu/LC_MESSAGES/django.po +145 -89
  5. umap/locale/pt/LC_MESSAGES/django.mo +0 -0
  6. umap/locale/pt/LC_MESSAGES/django.po +87 -37
  7. umap/static/umap/base.css +20 -6
  8. umap/static/umap/content.css +2 -2
  9. umap/static/umap/css/dialog.css +1 -1
  10. umap/static/umap/css/importers.css +2 -0
  11. umap/static/umap/css/panel.css +2 -2
  12. umap/static/umap/css/tooltip.css +1 -1
  13. umap/static/umap/img/16-white.svg +1 -3
  14. umap/static/umap/img/source/16-white.svg +2 -4
  15. umap/static/umap/js/components/alerts/alert.css +1 -1
  16. umap/static/umap/js/components/alerts/alert.js +1 -1
  17. umap/static/umap/js/modules/autocomplete.js +4 -4
  18. umap/static/umap/js/modules/browser.js +11 -11
  19. umap/static/umap/js/modules/caption.js +5 -5
  20. umap/static/umap/js/modules/dompurify.js +2 -3
  21. umap/static/umap/js/modules/facets.js +16 -10
  22. umap/static/umap/js/modules/global.js +16 -16
  23. umap/static/umap/js/modules/help.js +2 -2
  24. umap/static/umap/js/modules/importer.js +6 -6
  25. umap/static/umap/js/modules/importers/geodatamine.js +4 -4
  26. umap/static/umap/js/modules/importers/overpass.js +2 -2
  27. umap/static/umap/js/modules/orderable.js +2 -2
  28. umap/static/umap/js/modules/request.js +1 -1
  29. umap/static/umap/js/modules/rules.js +13 -10
  30. umap/static/umap/js/modules/sync/engine.js +3 -3
  31. umap/static/umap/js/modules/sync/updaters.js +10 -11
  32. umap/static/umap/js/modules/sync/websocket.js +1 -1
  33. umap/static/umap/js/modules/ui/dialog.js +1 -1
  34. umap/static/umap/js/modules/ui/panel.js +1 -1
  35. umap/static/umap/js/modules/ui/tooltip.js +6 -6
  36. umap/static/umap/js/modules/urls.js +1 -2
  37. umap/static/umap/js/modules/utils.js +19 -19
  38. umap/static/umap/js/umap.controls.js +26 -28
  39. umap/static/umap/js/umap.core.js +19 -15
  40. umap/static/umap/js/umap.datalayer.permissions.js +15 -18
  41. umap/static/umap/js/umap.features.js +102 -120
  42. umap/static/umap/js/umap.forms.js +46 -74
  43. umap/static/umap/js/umap.icon.js +17 -22
  44. umap/static/umap/js/umap.js +126 -131
  45. umap/static/umap/js/umap.layer.js +159 -167
  46. umap/static/umap/js/umap.permissions.js +6 -9
  47. umap/static/umap/js/umap.popup.js +20 -20
  48. umap/static/umap/js/umap.share.js +9 -15
  49. umap/static/umap/js/umap.slideshow.js +12 -14
  50. umap/static/umap/js/umap.tableeditor.js +5 -5
  51. umap/static/umap/locale/am_ET.json +5 -2
  52. umap/static/umap/locale/ar.json +5 -2
  53. umap/static/umap/locale/ast.json +5 -2
  54. umap/static/umap/locale/bg.json +5 -2
  55. umap/static/umap/locale/br.json +5 -2
  56. umap/static/umap/locale/ca.json +5 -2
  57. umap/static/umap/locale/cs_CZ.json +5 -2
  58. umap/static/umap/locale/da.json +5 -2
  59. umap/static/umap/locale/de.json +5 -2
  60. umap/static/umap/locale/el.json +10 -7
  61. umap/static/umap/locale/en.js +2 -1
  62. umap/static/umap/locale/en.json +5 -2
  63. umap/static/umap/locale/en_US.json +5 -2
  64. umap/static/umap/locale/es.js +9 -8
  65. umap/static/umap/locale/es.json +12 -9
  66. umap/static/umap/locale/et.json +5 -2
  67. umap/static/umap/locale/fa_IR.json +5 -2
  68. umap/static/umap/locale/fi.json +5 -2
  69. umap/static/umap/locale/fr.js +2 -1
  70. umap/static/umap/locale/fr.json +5 -2
  71. umap/static/umap/locale/gl.json +5 -2
  72. umap/static/umap/locale/he.json +5 -2
  73. umap/static/umap/locale/hr.json +5 -2
  74. umap/static/umap/locale/hu.json +5 -2
  75. umap/static/umap/locale/id.json +5 -2
  76. umap/static/umap/locale/is.json +5 -2
  77. umap/static/umap/locale/it.json +5 -2
  78. umap/static/umap/locale/ja.json +5 -2
  79. umap/static/umap/locale/ko.json +5 -2
  80. umap/static/umap/locale/lt.json +5 -2
  81. umap/static/umap/locale/ms.json +5 -2
  82. umap/static/umap/locale/nl.json +5 -2
  83. umap/static/umap/locale/no.json +5 -2
  84. umap/static/umap/locale/pl.json +5 -2
  85. umap/static/umap/locale/pl_PL.json +5 -2
  86. umap/static/umap/locale/pt.js +61 -60
  87. umap/static/umap/locale/pt.json +64 -61
  88. umap/static/umap/locale/pt_BR.json +5 -2
  89. umap/static/umap/locale/pt_PT.json +5 -2
  90. umap/static/umap/locale/ro.json +5 -2
  91. umap/static/umap/locale/ru.json +5 -2
  92. umap/static/umap/locale/sk_SK.json +5 -2
  93. umap/static/umap/locale/sl.json +5 -2
  94. umap/static/umap/locale/sr.json +5 -2
  95. umap/static/umap/locale/sv.json +5 -2
  96. umap/static/umap/locale/th_TH.json +5 -2
  97. umap/static/umap/locale/tr.json +5 -2
  98. umap/static/umap/locale/uk_UA.json +5 -2
  99. umap/static/umap/locale/vi.json +5 -2
  100. umap/static/umap/locale/vi_VN.json +5 -2
  101. umap/static/umap/locale/zh.json +5 -2
  102. umap/static/umap/locale/zh_CN.json +5 -2
  103. umap/static/umap/locale/zh_TW.Big5.json +5 -2
  104. umap/static/umap/locale/zh_TW.json +5 -2
  105. umap/static/umap/map.css +22 -22
  106. umap/static/umap/unittests/utils.js +5 -5
  107. umap/static/umap/vars.css +12 -1
  108. umap/storage.py +1 -1
  109. umap/tests/integration/test_browser.py +76 -3
  110. umap/tests/integration/test_edit_polygon.py +11 -0
  111. umap/tests/integration/test_map.py +29 -0
  112. umap/tests/integration/test_map_preview.py +36 -2
  113. umap/tests/integration/test_view_marker.py +2 -2
  114. umap/tests/test_views.py +2 -2
  115. umap/views.py +3 -2
  116. {umap_project-2.4.0b2.dist-info → umap_project-2.4.2.dist-info}/METADATA +3 -3
  117. {umap_project-2.4.0b2.dist-info → umap_project-2.4.2.dist-info}/RECORD +120 -129
  118. {umap_project-2.4.0b2.dist-info → umap_project-2.4.2.dist-info}/WHEEL +1 -1
  119. umap/.DS_Store +0 -0
  120. umap/static/.DS_Store +0 -0
  121. umap/static/umap/.DS_Store +0 -0
  122. umap/static/umap/favicons/.DS_Store +0 -0
  123. umap/static/umap/fonts/.DS_Store +0 -0
  124. umap/static/umap/img/.DS_Store +0 -0
  125. umap/static/umap/img/source/.DS_Store +0 -0
  126. umap/tests/.DS_Store +0 -0
  127. umap/tests/integration/.DS_Store +0 -0
  128. {umap_project-2.4.0b2.dist-info → umap_project-2.4.2.dist-info}/entry_points.txt +0 -0
  129. {umap_project-2.4.0b2.dist-info → umap_project-2.4.2.dist-info}/licenses/LICENSE +0 -0
@@ -61,8 +61,8 @@ L.FormBuilder.Element.include({
61
61
 
62
62
  get: function (own) {
63
63
  if (!this.options.inheritable || own) return this.builder.getter(this.field)
64
- const path = this.field.split('.'),
65
- key = path[path.length - 1]
64
+ const path = this.field.split('.')
65
+ const key = path[path.length - 1]
66
66
  return this.obj.getOption(key)
67
67
  },
68
68
 
@@ -296,10 +296,9 @@ L.FormBuilder.ColorPicker = L.FormBuilder.Input.extend({
296
296
  },
297
297
 
298
298
  onBlur: function () {
299
- const self = this,
300
- closePicker = () => {
301
- self.container.style.display = 'none'
302
- }
299
+ const closePicker = () => {
300
+ this.container.style.display = 'none'
301
+ }
303
302
  // We must leave time for the click to be listened.
304
303
  window.setTimeout(closePicker, 100)
305
304
  },
@@ -341,7 +340,7 @@ L.FormBuilder.TextColorPicker = L.FormBuilder.ColorPicker.extend({
341
340
  })
342
341
 
343
342
  L.FormBuilder.LayerTypeChooser = L.FormBuilder.Select.extend({
344
- getOptions: function () {
343
+ getOptions: () => {
345
344
  const layer_classes = [
346
345
  U.Layer.Default,
347
346
  U.Layer.Cluster,
@@ -353,7 +352,7 @@ L.FormBuilder.LayerTypeChooser = L.FormBuilder.Select.extend({
353
352
  })
354
353
 
355
354
  L.FormBuilder.SlideshowDelay = L.FormBuilder.IntSelect.extend({
356
- getOptions: function () {
355
+ getOptions: () => {
357
356
  const options = []
358
357
  for (let i = 1; i < 30; i++) {
359
358
  options.push([i * 1000, L._('{delay} seconds', { delay: i })])
@@ -459,9 +458,7 @@ L.FormBuilder.BlurInput.include({
459
458
  })
460
459
 
461
460
  L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
462
- type: function () {
463
- return 'hidden'
464
- },
461
+ type: () => 'hidden',
465
462
 
466
463
  build: function () {
467
464
  L.FormBuilder.BlurInput.prototype.build.call(this)
@@ -517,18 +514,13 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
517
514
  this
518
515
  )
519
516
  }
520
- const symbol = L.DomUtil.add(
521
- 'button',
522
- 'flat tab-symbols',
523
- this.tabs,
524
- L._('Symbol')
525
- ),
526
- char = L.DomUtil.add(
527
- 'button',
528
- 'flat tab-chars',
529
- this.tabs,
530
- L._('Emoji & Character')
531
- )
517
+ const symbol = L.DomUtil.add('button', 'flat tab-symbols', this.tabs, L._('Symbol'))
518
+ const char = L.DomUtil.add(
519
+ 'button',
520
+ 'flat tab-chars',
521
+ this.tabs,
522
+ L._('Emoji & Character')
523
+ )
532
524
  url = L.DomUtil.add('button', 'flat tab-url', this.tabs, L._('URL'))
533
525
  L.DomEvent.on(symbol, 'click', L.DomEvent.stop).on(
534
526
  symbol,
@@ -547,10 +539,10 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
547
539
 
548
540
  openTab: function (name) {
549
541
  const els = this.tabs.querySelectorAll('button')
550
- for (let el of els) {
542
+ for (const el of els) {
551
543
  L.DomUtil.removeClass(el, 'on')
552
544
  }
553
- let el = this.tabs.querySelector(`.tab-${name}`)
545
+ const el = this.tabs.querySelector(`.tab-${name}`)
554
546
  L.DomUtil.addClass(el, 'on')
555
547
  this.body.innerHTML = ''
556
548
  },
@@ -574,15 +566,15 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
574
566
  },
575
567
 
576
568
  addIconPreview: function (pictogram, parent) {
577
- const baseClass = 'umap-pictogram-choice',
578
- value = pictogram.src,
579
- search = U.Utils.normalize(this.searchInput.value),
580
- title = pictogram.attribution
581
- ? `${pictogram.name} — © ${pictogram.attribution}`
582
- : pictogram.name || pictogram.src
569
+ const baseClass = 'umap-pictogram-choice'
570
+ const value = pictogram.src
571
+ const search = U.Utils.normalize(this.searchInput.value)
572
+ const title = pictogram.attribution
573
+ ? `${pictogram.name} — © ${pictogram.attribution}`
574
+ : pictogram.name || pictogram.src
583
575
  if (search && U.Utils.normalize(title).indexOf(search) === -1) return
584
- const className = value === this.value() ? `${baseClass} selected` : baseClass,
585
- container = L.DomUtil.create('div', className, parent)
576
+ const className = value === this.value() ? `${baseClass} selected` : baseClass
577
+ const container = L.DomUtil.create('div', className, parent)
586
578
  U.Icon.makeIconElement(value, container)
587
579
  container.title = title
588
580
  L.DomEvent.on(
@@ -612,7 +604,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
612
604
  if (name) L.DomUtil.add('h6', '', parent, name)
613
605
  const grid = L.DomUtil.create('div', 'umap-pictogram-grid', parent)
614
606
  let status = false
615
- for (let item of items) {
607
+ for (const item of items) {
616
608
  status = this.addIconPreview(item, grid) || status
617
609
  }
618
610
  if (status) this.grid.appendChild(parent)
@@ -630,7 +622,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
630
622
  const sorted = Object.entries(categories).toSorted(([a], [b]) =>
631
623
  U.Utils.naturalSort(a, b, L.lang)
632
624
  )
633
- for (let [name, items] of sorted) {
625
+ for (const [name, items] of sorted) {
634
626
  this.addCategory(items, name)
635
627
  }
636
628
  },
@@ -701,7 +693,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
701
693
  return input
702
694
  },
703
695
 
704
- unselectAll: function (container) {
696
+ unselectAll: (container) => {
705
697
  const els = container.querySelectorAll('div.selected')
706
698
  for (const el in els) {
707
699
  if (els.hasOwnProperty(el)) L.DomUtil.removeClass(els[el], 'selected')
@@ -710,9 +702,7 @@ L.FormBuilder.IconUrl = L.FormBuilder.BlurInput.extend({
710
702
  })
711
703
 
712
704
  L.FormBuilder.Url = L.FormBuilder.Input.extend({
713
- type: function () {
714
- return 'url'
715
- },
705
+ type: () => 'url',
716
706
  })
717
707
 
718
708
  L.FormBuilder.Switch = L.FormBuilder.CheckBox.extend({
@@ -748,9 +738,9 @@ L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({
748
738
  this.container = L.DomUtil.create('fieldset', 'umap-facet', this.parentNode)
749
739
  this.container.appendChild(this.label)
750
740
  this.ul = L.DomUtil.create('ul', '', this.container)
751
- this.type = this.options.criteria['type']
741
+ this.type = this.options.criteria.type
752
742
 
753
- const choices = this.options.criteria['choices']
743
+ const choices = this.options.criteria.choices
754
744
  choices.sort()
755
745
  choices.forEach((value) => this.buildLi(value))
756
746
  },
@@ -763,7 +753,7 @@ L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({
763
753
 
764
754
  input.type = this.type
765
755
  input.name = `${this.type}_${this.name}`
766
- input.checked = this.get()['choices'].includes(value)
756
+ input.checked = this.get().choices.includes(value)
767
757
  input.dataset.value = value
768
758
 
769
759
  L.DomEvent.on(input, 'change', (e) => this.sync())
@@ -780,17 +770,11 @@ L.FormBuilder.FacetSearchChoices = L.FormBuilder.FacetSearchBase.extend({
780
770
  })
781
771
 
782
772
  L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({
783
- getInputType: function (type) {
784
- return type
785
- },
773
+ getInputType: (type) => type,
786
774
 
787
- getLabels: function () {
788
- return [L._('Min'), L._('Max')]
789
- },
775
+ getLabels: () => [L._('Min'), L._('Max')],
790
776
 
791
- prepareForHTML: function (value) {
792
- return value.valueOf()
793
- },
777
+ prepareForHTML: (value) => value.valueOf(),
794
778
 
795
779
  build: function () {
796
780
  this.container = L.DomUtil.create('fieldset', 'umap-facet', this.parentNode)
@@ -856,13 +840,13 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({
856
840
  isMinModified: function () {
857
841
  const default_ = this.minInput.getAttribute('value')
858
842
  const current = this.minInput.value
859
- return current != default_
843
+ return current !== default_
860
844
  },
861
845
 
862
846
  isMaxModified: function () {
863
847
  const default_ = this.maxInput.getAttribute('value')
864
848
  const current = this.maxInput.value
865
- return current != default_
849
+ return current !== default_
866
850
  },
867
851
 
868
852
  toJS: function () {
@@ -880,39 +864,29 @@ L.FormBuilder.MinMaxBase = L.FormBuilder.FacetSearchBase.extend({
880
864
  })
881
865
 
882
866
  L.FormBuilder.FacetSearchNumber = L.FormBuilder.MinMaxBase.extend({
883
- prepareForJS: function (value) {
884
- return new Number(value)
885
- },
867
+ prepareForJS: (value) => new Number(value),
886
868
  })
887
869
 
888
870
  L.FormBuilder.FacetSearchDate = L.FormBuilder.MinMaxBase.extend({
889
- prepareForJS: function (value) {
890
- return new Date(value)
891
- },
871
+ prepareForJS: (value) => new Date(value),
892
872
 
893
- toLocaleDateTime: function (dt) {
894
- return new Date(dt.valueOf() - dt.getTimezoneOffset() * 60000)
895
- },
873
+ toLocaleDateTime: (dt) => new Date(dt.valueOf() - dt.getTimezoneOffset() * 60000),
896
874
 
897
875
  prepareForHTML: function (value) {
898
876
  // Value must be in local time
899
- if (isNaN(value)) return
877
+ if (Number.isNaN(value)) return
900
878
  return this.toLocaleDateTime(value).toISOString().substr(0, 10)
901
879
  },
902
880
 
903
- getLabels: function () {
904
- return [L._('From'), L._('Until')]
905
- },
881
+ getLabels: () => [L._('From'), L._('Until')],
906
882
  })
907
883
 
908
884
  L.FormBuilder.FacetSearchDateTime = L.FormBuilder.FacetSearchDate.extend({
909
- getInputType: function (type) {
910
- return 'datetime-local'
911
- },
885
+ getInputType: (type) => 'datetime-local',
912
886
 
913
887
  prepareForHTML: function (value) {
914
888
  // Value must be in local time
915
- if (isNaN(value)) return
889
+ if (Number.isNaN(value)) return
916
890
  return this.toLocaleDateTime(value).toISOString().slice(0, -1)
917
891
  },
918
892
  })
@@ -1020,9 +994,7 @@ L.FormBuilder.DataLayersControl = L.FormBuilder.TernaryChoices.extend({
1020
994
  })
1021
995
 
1022
996
  L.FormBuilder.Range = L.FormBuilder.FloatInput.extend({
1023
- type: function () {
1024
- return 'range'
1025
- },
997
+ type: () => 'range',
1026
998
 
1027
999
  value: function () {
1028
1000
  return L.DomUtil.hasClass(this.wrapper, 'undefined')
@@ -1124,7 +1096,7 @@ U.FormBuilder = L.FormBuilder.extend({
1124
1096
  },
1125
1097
 
1126
1098
  computeDefaultOptions: function () {
1127
- for (let [key, schema] of Object.entries(U.SCHEMA)) {
1099
+ for (const [key, schema] of Object.entries(U.SCHEMA)) {
1128
1100
  if (schema.type === Boolean) {
1129
1101
  if (schema.nullable) schema.handler = 'NullableChoices'
1130
1102
  else schema.handler = 'Switch'
@@ -12,12 +12,12 @@ U.Icon = L.DivIcon.extend({
12
12
  options = L.Util.extend({}, default_options, options)
13
13
  L.Icon.prototype.initialize.call(this, options)
14
14
  this.feature = this.options.feature
15
- if (this.feature && this.feature.isReadOnly()) {
15
+ if (this.feature?.isReadOnly()) {
16
16
  this.options.className += ' readonly'
17
17
  }
18
18
  },
19
19
 
20
- _setRecent: function (url) {
20
+ _setRecent: (url) => {
21
21
  if (U.Utils.hasVar(url)) return
22
22
  if (url === U.SCHEMA.iconUrl.default) return
23
23
  if (U.Icon.RECENT.indexOf(url) === -1) {
@@ -27,7 +27,7 @@ U.Icon = L.DivIcon.extend({
27
27
 
28
28
  _getIconUrl: function (name) {
29
29
  let url
30
- if (this.feature && this.feature._getIconUrl(name)) {
30
+ if (this.feature?._getIconUrl(name)) {
31
31
  url = this.feature._getIconUrl(name)
32
32
  this._setRecent(url)
33
33
  } else {
@@ -49,14 +49,10 @@ U.Icon = L.DivIcon.extend({
49
49
  return this.map.getDefaultOption('iconOpacity')
50
50
  },
51
51
 
52
- formatUrl: function (url, feature) {
53
- return U.Utils.greedyTemplate(
54
- url || '',
55
- feature ? feature.extendedProperties() : {}
56
- )
57
- },
52
+ formatUrl: (url, feature) =>
53
+ U.Utils.greedyTemplate(url || '', feature ? feature.extendedProperties() : {}),
58
54
 
59
- onAdd: function () {},
55
+ onAdd: () => {},
60
56
  })
61
57
 
62
58
  U.Icon.Default = U.Icon.extend({
@@ -74,8 +70,8 @@ U.Icon.Default = U.Icon.extend({
74
70
 
75
71
  _setIconStyles: function (img, name) {
76
72
  U.Icon.prototype._setIconStyles.call(this, img, name)
77
- const color = this._getColor(),
78
- opacity = this._getOpacity()
73
+ const color = this._getColor()
74
+ const opacity = this._getOpacity()
79
75
  this.elements.container.style.backgroundColor = color
80
76
  this.elements.arrow.style.borderTopColor = color
81
77
  this.elements.container.style.opacity = opacity
@@ -189,10 +185,10 @@ U.Icon.Cluster = L.DivIcon.extend({
189
185
  },
190
186
 
191
187
  createIcon: function () {
192
- const container = L.DomUtil.create('div', 'leaflet-marker-icon marker-cluster'),
193
- div = L.DomUtil.create('div', '', container),
194
- span = L.DomUtil.create('span', '', div),
195
- backgroundColor = this.datalayer.getColor()
188
+ const container = L.DomUtil.create('div', 'leaflet-marker-icon marker-cluster')
189
+ const div = L.DomUtil.create('div', '', container)
190
+ const span = L.DomUtil.create('span', '', div)
191
+ const backgroundColor = this.datalayer.getColor()
196
192
  span.textContent = this.cluster.getChildCount()
197
193
  div.style.backgroundColor = backgroundColor
198
194
  return container
@@ -201,18 +197,17 @@ U.Icon.Cluster = L.DivIcon.extend({
201
197
  computeTextColor: function (el) {
202
198
  let color
203
199
  const backgroundColor = this.datalayer.getColor()
204
- if (this.datalayer.options.cluster && this.datalayer.options.cluster.textColor) {
200
+ if (this.datalayer.options.cluster?.textColor) {
205
201
  color = this.datalayer.options.cluster.textColor
206
202
  }
207
203
  return color || L.DomUtil.TextColorFromBackgroundColor(el, backgroundColor)
208
204
  },
209
205
  })
210
206
 
211
- U.Icon.isImg = function (src) {
212
- return U.Utils.isPath(src) || U.Utils.isRemoteUrl(src) || U.Utils.isDataImage(src)
213
- }
207
+ U.Icon.isImg = (src) =>
208
+ U.Utils.isPath(src) || U.Utils.isRemoteUrl(src) || U.Utils.isDataImage(src)
214
209
 
215
- U.Icon.makeIconElement = function (src, parent) {
210
+ U.Icon.makeIconElement = (src, parent) => {
216
211
  let icon
217
212
  if (U.Icon.isImg(src)) {
218
213
  icon = L.DomUtil.create('img')
@@ -225,7 +220,7 @@ U.Icon.makeIconElement = function (src, parent) {
225
220
  return icon
226
221
  }
227
222
 
228
- U.Icon.setIconContrast = function (icon, parent, src, bgcolor) {
223
+ U.Icon.setIconContrast = (icon, parent, src, bgcolor) => {
229
224
  /*
230
225
  * icon: the element we'll adapt the style, it can be an image or text
231
226
  * parent: the element we'll consider to decide whether to adapt the style,