wesam0099 commited on
Commit
3d29aa4
·
1 Parent(s): 3e079c2

Fix layout jumping with fixed height container

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. ui/map_viewer.py +3 -0
app.py CHANGED
@@ -1,5 +1,5 @@
1
  """
2
- Traffic Accident Reconstruction Syste
3
  ======================================
4
  Main Streamlit Application
5
  Huawei AI Innovation Challenge 2026
 
1
  """
2
+ Traffic Accident Reconstruction System
3
  ======================================
4
  Main Streamlit Application
5
  Huawei AI Innovation Challenge 2026
ui/map_viewer.py CHANGED
@@ -431,5 +431,8 @@ def render_results_map(scenarios: list, selected_scenario: int = 0):
431
  icon=folium.Icon(color='purple', icon='info-sign')
432
  ).add_to(m)
433
 
 
 
434
  # Display map using static version to prevent jumping
435
  folium_static(m, width=700, height=500)
 
 
431
  icon=folium.Icon(color='purple', icon='info-sign')
432
  ).add_to(m)
433
 
434
+ # Add fixed height container to prevent layout shift
435
+ st.markdown('<div style="min-height: 500px;">', unsafe_allow_html=True)
436
  # Display map using static version to prevent jumping
437
  folium_static(m, width=700, height=500)
438
+ st.markdown('</div>', unsafe_allow_html=True)