Skip to content

Commit

Permalink
Merge pull request #121 from perfectly-preserved-pie:dev
Browse files Browse the repository at this point in the history
Fix autoPan issue.
  • Loading branch information
perfectly-preserved-pie authored Aug 27, 2023
2 parents ccbaa59 + f33bcf2 commit c0ed16d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
8 changes: 4 additions & 4 deletions assets/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ window.dash_props = Object.assign({}, window.dash_props, {
layer.bindPopup(feature.properties.popup, {
// Here you can customize the popup
// https://leafletjs.com/reference.html#popup-option
autoPan: false,
closeButton: false,
// Set the maxHeight to 500px if the device is mobile, otherwise use the default value
maxHeight: window.innerWidth < 768 ? 500 : 650,
//autoPan: false,
//closeButton: false,
// Set the maxHeight to 375px if the device is mobile, otherwise use the default value
maxHeight: window.innerWidth < 768 ? 375 : 650,
// Set the maxWidth to 175px if the device is mobile, otherwise use the default value
maxWidth: window.innerWidth < 768 ? 175 : 300,
})
Expand Down
3 changes: 1 addition & 2 deletions pages/buy_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,13 @@ def senior_community_function(choice, subtype_selected):
lat_mean = df['Latitude'].mean()
long_mean = df['Longitude'].mean()
map = dl.Map(
[dl.TileLayer(), dl.LayerGroup(id="buy_geojson"), dl.FullscreenControl()],
[dl.TileLayer(), dl.LayerGroup(id="buy_geojson"), dl.FullScreenControl()],
id='map',
zoom=9,
minZoom=9,
center=(lat_mean, long_mean),
preferCanvas=True,
closePopupOnClick=True,
tap=False,
style={'width': '100%', 'height': '90vh', 'margin': "auto", "display": "inline-block"}
)

Expand Down
3 changes: 1 addition & 2 deletions pages/lease_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,14 +897,13 @@ def subtype_function(choice):

# Generate the map
map = dl.Map(
[dl.TileLayer(), dl.LayerGroup(id="lease_geojson"), dl.FullscreenControl()],
[dl.TileLayer(), dl.LayerGroup(id="lease_geojson"), dl.FullScreenControl()],
id='map',
zoom=9,
minZoom=9,
center=(lat_mean, long_mean),
preferCanvas=True,
closePopupOnClick=True,
tap=False,
style={'width': '100%', 'height': '90vh', 'margin': "auto", "display": "inline-block"}
)

Expand Down
18 changes: 9 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
beautifulsoup4==4.12.2
dash_bootstrap_components==1.4.1
dash_bootstrap_components==1.4.2
dash_core_components==2.0.0
dash_extensions==1.0.1
dash_extensions==1.0.3
dash_html_components==2.0.0
dash_leaflet==0.1.23
dash==2.10.0
dash-leaflet==1.0.5rc1
dash==2.12.1
geopy==2.3.0
gunicorn==20.1.0
imagekitio==3.0.1
gunicorn==21.2.0
imagekitio==3.1.0
loguru==0.7.0
numpy==1.24.3
numpy==1.25.2
openpyxl==3.1.2
orjson==3.9.0
orjson==3.9.5
pandas==2.0.1
protobuf==3.20.*
pyarrow==12.0.1
pyarrow==13.0.0
python-dotenv==1.0.0
pyyaml
requests==2.31.0
Expand Down

0 comments on commit c0ed16d

Please sign in to comment.