umap-project 2.7.0b0__py3-none-any.whl → 2.7.0b2__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.

umap/__init__.py CHANGED
@@ -1 +1 @@
1
- VERSION = "2.7.0b0"
1
+ VERSION = "2.7.0b2"
@@ -1,7 +1,7 @@
1
1
  .umap-contextmenu {
2
2
  background-color: var(--background-color);
3
3
  padding: calc(var(--box-padding) / 2) var(--box-padding);
4
- position: absolute;
4
+ position: fixed;
5
5
  z-index: var(--zindex-contextmenu);
6
6
  border-radius: var(--border-radius);
7
7
  box-shadow: var(--block-shadow);
@@ -88,10 +88,7 @@ const FeatureMixin = {
88
88
  DomEvent.stop(event)
89
89
  const items = this._map.getContextMenuItems(event)
90
90
  items.push('-', ...this.feature.getContextMenuItems(event))
91
- this._map.contextmenu.open(
92
- [event.originalEvent.clientX, event.originalEvent.clientY],
93
- items
94
- )
91
+ this._map.contextmenu.open(event.originalEvent, items)
95
92
  },
96
93
 
97
94
  onCommit: function () {
@@ -64,7 +64,7 @@ export default class TableEditor extends WithTemplate {
64
64
  action: () => this.deleteProperty(property),
65
65
  })
66
66
  }
67
- this.contextmenu.open([event.clientX, event.clientY], actions)
67
+ this.contextmenu.open(event, actions)
68
68
  }
69
69
 
70
70
  renderHeaders() {
@@ -15,7 +15,13 @@ export default class ContextMenu extends Positioned {
15
15
  })
16
16
  }
17
17
 
18
- open([left, top], items) {
18
+ open(event, items) {
19
+ const left = event.clientX
20
+ const top = event.clientY
21
+ this.openAt([left, top], items)
22
+ }
23
+
24
+ openAt([left, top], items) {
19
25
  this.container.innerHTML = ''
20
26
  for (const item of items) {
21
27
  if (item === '-') {
@@ -36,7 +42,12 @@ export default class ContextMenu extends Positioned {
36
42
  this.container.appendChild(li)
37
43
  }
38
44
  }
39
- document.body.appendChild(this.container)
45
+ // When adding contextmenu below the map container, clicking on any link will send the
46
+ // "focusout" element on link click, preventing to trigger the click action
47
+ const parent = document
48
+ .elementFromPoint(left, top)
49
+ .closest('.leaflet-container').parentNode
50
+ parent.appendChild(this.container)
40
51
  if (this.options.fixed) {
41
52
  this.setPosition({ left, top })
42
53
  } else {
@@ -663,7 +663,7 @@ const ControlsMixin = {
663
663
  button.addEventListener('click', () => {
664
664
  const x = button.offsetLeft
665
665
  const y = button.offsetTop + button.offsetHeight
666
- menu.open([x, y], actions)
666
+ menu.openAt([x, y], actions)
667
667
  })
668
668
  }
669
669
  this.help.getStartedLink(rightContainer)
@@ -1726,8 +1726,10 @@ U.Map = L.Map.extend({
1726
1726
  })
1727
1727
  }
1728
1728
  }
1729
+ if (items.length) {
1730
+ items.push('-')
1731
+ }
1729
1732
  items.push(
1730
- '-',
1731
1733
  {
1732
1734
  label: L._('Open browser'),
1733
1735
  action: () => this.openBrowser('layers'),
@@ -1770,10 +1772,7 @@ U.Map = L.Map.extend({
1770
1772
 
1771
1773
  onContextMenu: function (event) {
1772
1774
  const items = this.getContextMenuItems(event)
1773
- this.contextmenu.open(
1774
- [event.originalEvent.clientX, event.originalEvent.clientY],
1775
- items
1776
- )
1775
+ this.contextmenu.open(event.originalEvent, items)
1777
1776
  },
1778
1777
 
1779
1778
  editInOSM: function (e) {
@@ -10,8 +10,6 @@
10
10
  href="{% static 'umap/vendors/editinosm/Leaflet.EditInOSM.css' %}" />
11
11
  <link rel="stylesheet"
12
12
  href="{% static 'umap/vendors/minimap/Control.MiniMap.min.css' %}" />
13
- <link rel="stylesheet"
14
- href="{% static 'umap/vendors/contextmenu/leaflet.contextmenu.min.css' %}" />
15
13
  <link rel="stylesheet"
16
14
  href="{% static 'umap/vendors/toolbar/leaflet.toolbar.css' %}" />
17
15
  <link rel="stylesheet"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: umap-project
3
- Version: 2.7.0b0
3
+ Version: 2.7.0b2
4
4
  Summary: Create maps with OpenStreetMap layers in a minute and embed them in your site.
5
5
  Author-email: Yohan Boniface <yb@enix.org>
6
6
  Maintainer-email: David Larlet <david@larlet.fr>
@@ -1,4 +1,4 @@
1
- umap/__init__.py,sha256=fCHwe9mUwApiRsmXZOhhZ0lfoy3Sv_1gsRbkHsMLuO4,20
1
+ umap/__init__.py,sha256=TVHteVndmgr5cRg4TdBAgaikMniV5zbnrVbiBJIpUbQ,20
2
2
  umap/admin.py,sha256=LoQytPGK6pLBqZ5QgQ9DIPAxhTG31cTtHOCqO9BY5S4,2645
3
3
  umap/apps.py,sha256=5ssKqPUuNJlapaBmr4LY_HDb7J1NFCT3wzythxQOOfs,109
4
4
  umap/autocomplete.py,sha256=WUsbsVBl_KzzEzxB4g3rAoS5-eEvCZGtelVzXeOFV90,444
@@ -157,7 +157,7 @@ umap/static/umap/openstreetmap.png,sha256=xccBb_RsN7uchm7fRowVLjrzmCtj1-1PLByurk
157
157
  umap/static/umap/theme.css,sha256=gkbyghlT5kNfz0Qyg1JL7xalqvHVx321eO9qlnvcaAU,49
158
158
  umap/static/umap/twitter.png,sha256=BnVH7PcYlgKW56KHSOMRPevji2DvhJmvzFjl3-iF7c0,3225
159
159
  umap/static/umap/vars.css,sha256=PiwVk4MzyFjnnQTzQ8rorQenpzoB2l3dGoafxtSKmaU,1752
160
- umap/static/umap/css/contextmenu.css,sha256=ozBmOn9N6zCvD-JUSj6oWgZawTR6OVhRrQmkARY-KS4,440
160
+ umap/static/umap/css/contextmenu.css,sha256=AdPajFTy2M_yHbkMKDYdh45gRO4amNd0OXRYYDNZSI4,437
161
161
  umap/static/umap/css/dialog.css,sha256=9qwy9rOcTQY6SPkteM7dW1t36XQBJVoGETQatSOvffM,879
162
162
  umap/static/umap/css/icon.css,sha256=e9hadIEzsVJKnTVvueG0IGbNNeFIM1yqboJhsXVE0rs,3868
163
163
  umap/static/umap/css/importers.css,sha256=qsUmVtV4pyy5yzhKsGqMoCqUhoD5RoFDo69TuI6rSgw,1326
@@ -212,10 +212,10 @@ umap/static/umap/img/source/16-white.svg,sha256=aQE1L1FGy46pqqxn8iSNcfur5GFP7JIb
212
212
  umap/static/umap/img/source/16.svg,sha256=U3cXEecGdlLm3X-4rrLk2c6-OJgGeRRt9ZBVMaswEZQ,46531
213
213
  umap/static/umap/img/source/24-white.svg,sha256=F4lvAvzlTaqUsVhB13PXl7X-r4oz6rWykgHv0Dxmdec,28439
214
214
  umap/static/umap/img/source/24.svg,sha256=zIuQN1fv_w0asmxzuiCh2TErV4za8Mqg6pK-4YKAt-w,37617
215
- umap/static/umap/js/umap.controls.js,sha256=nwpKvihCEqJMbxlEUsB57JvdNKpnlSf4KpO-VmbqTLI,35878
215
+ umap/static/umap/js/umap.controls.js,sha256=w96YFzJh9QoWJrpJkLH7QB4lLJJ4Zs1gaOSSJ_efYds,35880
216
216
  umap/static/umap/js/umap.core.js,sha256=xIy3DGUMw1A2SD1-CbBmjN_Xh2wvRgE4ZA2k5tC41Qs,7710
217
217
  umap/static/umap/js/umap.forms.js,sha256=T-qC-xxLaY5FaQW-7T_6OKwBBU6HCRX9JK6BO3PYfn8,31554
218
- umap/static/umap/js/umap.js,sha256=-L8SM61LhPifvicxeNlvVFzjWuWLFQ2n8d7m0PORLnc,57624
218
+ umap/static/umap/js/umap.js,sha256=vstQbnffZhP-_Qh6bUf2PPx-twKQF6ww-A2KlNxo2PQ,57608
219
219
  umap/static/umap/js/components/base.js,sha256=gDb1fGuNCC1KEu4PlQflC1PDNyrulhqLhmlsjyCJpps,1575
220
220
  umap/static/umap/js/components/fragment.js,sha256=2zFkX4A0iVeebZJawmveEMKMXQyYmBuY67rbZUPo-Fs,341
221
221
  umap/static/umap/js/components/alerts/alert.css,sha256=fSmbDDjXjEYLfgnEAVDhyqWiBOUy2YhVRy0_den-7Dk,4930
@@ -238,7 +238,7 @@ umap/static/umap/js/modules/rules.js,sha256=NO2GeUDgPfWp8VAkV0AE-BeQsDSVYCutcJIk
238
238
  umap/static/umap/js/modules/schema.js,sha256=TNUNj4_2WDN_0vK083cnui0gKI-qHfiIzkO8sWLJtYY,13071
239
239
  umap/static/umap/js/modules/share.js,sha256=XFEhE26Fek9tINpzbAQvXzrwoTRlvyLwarDcJW1bdRw,7253
240
240
  umap/static/umap/js/modules/slideshow.js,sha256=fMpQ93VU7Uc9Mhxary_vrAdAK8g_P5Ch6pTVInIJzW4,3445
241
- umap/static/umap/js/modules/tableeditor.js,sha256=o8t6zheQcaZ9Ybp67W8AFnMJvbHgLuJsOXXQajCwX7U,9788
241
+ umap/static/umap/js/modules/tableeditor.js,sha256=VxIrKAtIuxXmpsJAJ4IGZTC7EiuWtNu8YWDjIUkIbHg,9763
242
242
  umap/static/umap/js/modules/urls.js,sha256=oKkD5jfZMk3752nOWRjpNxVBPUJVcJvNONjnjkKwaVc,876
243
243
  umap/static/umap/js/modules/utils.js,sha256=dfq-ZwRCu1wYf7uB3L6bd_mrRe3S6n6r9cF7tDf1uWI,11511
244
244
  umap/static/umap/js/modules/data/features.js,sha256=D7kDDjdXdjzijnJenQOCMprng5pLeckj5lpCfXJ7FWQ,30878
@@ -250,7 +250,7 @@ umap/static/umap/js/modules/importers/overpass.js,sha256=wshao2HAJIz_qowqu6tWxeF
250
250
  umap/static/umap/js/modules/rendering/icon.js,sha256=hguSJt3wDqe0oSQIm1zrYSbyktKVQUWv-QTo5fYdlc8,7861
251
251
  umap/static/umap/js/modules/rendering/popup.js,sha256=s_LhWy3nqKm_GEwc9aCbzSG1JM9M5-kshwNfKQNdu3A,2460
252
252
  umap/static/umap/js/modules/rendering/template.js,sha256=79umxBD0pMuz8n-sx54Zg7FKcm_fbEkGDlt3vnEXtXo,7177
253
- umap/static/umap/js/modules/rendering/ui.js,sha256=XLJFyL_ociMsVpb-yEvVH0_OCeQjRb2hy4_d9TwhjXk,12569
253
+ umap/static/umap/js/modules/rendering/ui.js,sha256=R7rKQ5vzp4hAX_uNlrY8L_EmTHIfdyBXz9L0WrUyob0,12512
254
254
  umap/static/umap/js/modules/rendering/layers/base.js,sha256=QNQm_IHSX2jwhr6RfoURk9ypSi4lH1Z0voZNH84VLV0,2419
255
255
  umap/static/umap/js/modules/rendering/layers/classified.js,sha256=HhmYc_PCaA4VoRO_2TUIaPhkiRE1RUOoNEJVGs10Etk,14550
256
256
  umap/static/umap/js/modules/rendering/layers/cluster.js,sha256=tIwkcJhJ7SQTpMK7YXumcA6KMjuZjPKWzc_xuF9d_Dc,3360
@@ -260,7 +260,7 @@ umap/static/umap/js/modules/sync/hlc.js,sha256=gdyRDYx3341csuCDTv8EYHYmJkQLJd5HL
260
260
  umap/static/umap/js/modules/sync/updaters.js,sha256=MYkEyOO7iafzctJrSSBVPfLAbRUXjAyIvXIBsCMI-UY,2930
261
261
  umap/static/umap/js/modules/sync/websocket.js,sha256=1UtvsTAm-gkfpBRcLPykPvDyax3mQSxG0KOjWhqnAIU,647
262
262
  umap/static/umap/js/modules/ui/base.js,sha256=8PN8TRIBqTANRufwVvV0XzOdaYQuRCnlWGbTGq8FZiM,2491
263
- umap/static/umap/js/modules/ui/contextmenu.js,sha256=QflpIfeLJRNFJrOUtBaaiDuPIH9xz0wzR8BfAz5X6cc,2015
263
+ umap/static/umap/js/modules/ui/contextmenu.js,sha256=bCLDRL3I5h7kq5fIP_fY-K23peXNeheXYbdx-GoCgOI,2417
264
264
  umap/static/umap/js/modules/ui/dialog.js,sha256=fP51HDkucZpXnx1v0h5eAckj77RsADZO_CzPRbjeKSU,5407
265
265
  umap/static/umap/js/modules/ui/panel.js,sha256=Iqfagid9BxB0zjexBElaA_hLejoePdfORt4Di5lHVLY,2994
266
266
  umap/static/umap/js/modules/ui/tooltip.js,sha256=M2KBb5CA4AvaA-6QgfpUKMYQuGXzTqx4ZVA9fkMRBEs,1642
@@ -447,7 +447,7 @@ umap/templates/umap/about_summary.html,sha256=5pvCvX34YHk_XCtZfcRSznvRwi_-UJMioD
447
447
  umap/templates/umap/branding.html,sha256=8IzkIWqiZckgkX9FC-n1v6f8JIB2q7DcX3JHscxsaYA,60
448
448
  umap/templates/umap/content.html,sha256=KfNQ18LcbxFd00tHQeirGy5Vh75qQNM6pj0bQbcy4Bo,2246
449
449
  umap/templates/umap/content_footer.html,sha256=wkdc4Usuq4-vDIJHPxv-KS6KL4gBkUl7ARyU7zz1Zis,1154
450
- umap/templates/umap/css.html,sha256=j1oNsuz8g1Fc9rLGhIby9ngQpQYq42uYYn7Q_965aQk,2175
450
+ umap/templates/umap/css.html,sha256=lR84fa1TVT9aDwMOko2VhgjBMEWFZlembJajSVuTNcs,2068
451
451
  umap/templates/umap/dashboard_menu.html,sha256=DEzGwiL_U1ntDpY0Ybda5ijDMSNw-n7Vb-V7HrsqYgo,688
452
452
  umap/templates/umap/footer.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
453
453
  umap/templates/umap/header.html,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -551,8 +551,8 @@ umap/tests/integration/test_view_marker.py,sha256=sPZBbX5jF8WkbAl3Q9eta7a80E2rPX
551
551
  umap/tests/integration/test_view_polygon.py,sha256=NMJC6Nt9VpQ8FIU9Pqq2OspHv49xsWlsoXCr8iBa0VA,2060
552
552
  umap/tests/integration/test_view_polyline.py,sha256=n1QVIdl-Xg9yN9o-Jc6VnPhFAuUspsgY0odiUe_jJC4,1598
553
553
  umap/tests/integration/test_websocket_sync.py,sha256=pcEoXgEFvLBdmQA_rGa5BcHE2eBe3P0qZ6X3j4goRzQ,12764
554
- umap_project-2.7.0b0.dist-info/METADATA,sha256=iN63dwi-Q2njSvl2hNnOB7Akrp2Wa4F2v9k1gAr17JQ,2682
555
- umap_project-2.7.0b0.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
556
- umap_project-2.7.0b0.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
557
- umap_project-2.7.0b0.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
558
- umap_project-2.7.0b0.dist-info/RECORD,,
554
+ umap_project-2.7.0b2.dist-info/METADATA,sha256=kaKvenQb814OB1W7rrBhQWCLCkLEkuHw2s9Ckr8CL-E,2682
555
+ umap_project-2.7.0b2.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
556
+ umap_project-2.7.0b2.dist-info/entry_points.txt,sha256=gz-KDQfEsMLBae8ABOD3foJsCYGPW1tA4Y394R_1RW8,39
557
+ umap_project-2.7.0b2.dist-info/licenses/LICENSE,sha256=kQtrtRKgiPhcl7aO0-lmvbrNAXu7WHyiXvPrUk-TD2Q,820
558
+ umap_project-2.7.0b2.dist-info/RECORD,,