Rammohan0504 commited on
Commit
4e4083f
·
verified ·
1 Parent(s): f9d902d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -101,8 +101,8 @@ popup_js = """
101
 
102
  // Get the button's position
103
  const rect = event.target.getBoundingClientRect();
104
- const popupX = rect.left + window.scrollX;
105
- const popupY = rect.top + window.scrollY;
106
 
107
  // Set the popup's position
108
  popup.style.left = popupX + "px";
@@ -138,7 +138,7 @@ popup_html = """
138
  <div id="overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 999;">
139
  </div>
140
  <div id="custom-popup"
141
- style="position: absolute; display: none; width: 250px; background: white; padding: 10px; border-radius: 10px; box-shadow: 0px 4px 6px rgba(0,0,0,0.1); z-index: 1000;">
142
  </div>
143
  """
144
 
 
101
 
102
  // Get the button's position
103
  const rect = event.target.getBoundingClientRect();
104
+ const popupX = rect.left + window.scrollX + 10; // Offset for better visibility
105
+ const popupY = rect.top + window.scrollY + 10;
106
 
107
  // Set the popup's position
108
  popup.style.left = popupX + "px";
 
138
  <div id="overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; z-index: 999;">
139
  </div>
140
  <div id="custom-popup"
141
+ style="position: absolute; display: none; width: 300px; background: white; padding: 10px; border-radius: 10px; box-shadow: 0px 4px 6px rgba(0,0,0,0.1); z-index: 1000;">
142
  </div>
143
  """
144