Skip to content

Commit

Permalink
2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanboniface committed Mar 1, 2024
1 parent 2a2e237 commit c658b28
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 2.0.4 - 2024-03-01

* fix zoom and fullscreen not shown by default

## 2.0.3 - 2024-03-01

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion umap/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "2.0.3"
VERSION = "2.0.4"
4 changes: 2 additions & 2 deletions umap/static/umap/js/umap.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ U.Map = L.Map.extend({
this.name = this.options.name
this.description = this.options.description
this.demoTileInfos = this.options.demoTileInfos
this.options.zoomControl = zoomControl
this.options.fullscreenControl = fullscreenControl
this.options.zoomControl = zoomControl !== undefined ? zoomControl : true
this.options.fullscreenControl = fullscreenControl !== undefined ? fullscreenControl : true
this.datalayersOnLoad = L.Util.queryString('datalayers')
if (this.datalayersOnLoad) {
this.datalayersOnLoad = this.datalayersOnLoad.toString().split(',')
Expand Down
9 changes: 9 additions & 0 deletions umap/tests/integration/test_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,12 @@ def test_minimap_on_load(map, live_server, datalayer, page):
map.save()
page.goto(f"{live_server.url}{map.get_absolute_url()}")
expect(page.locator(".leaflet-control-minimap")).to_be_visible()


def test_zoom_control_on_load(map, live_server, page):
page.goto(f"{live_server.url}{map.get_absolute_url()}")
expect(page.locator(".leaflet-control-zoom")).to_be_visible()
map.settings["properties"]["zoomControl"] = False
map.save()
page.goto(f"{live_server.url}{map.get_absolute_url()}")
expect(page.locator(".leaflet-control-zoom")).to_be_hidden()

0 comments on commit c658b28

Please sign in to comment.