Fix dot when scrolling
This commit is contained in:
		
							parent
							
								
									017377da1b
								
							
						
					
					
						commit
						68d3d08ce5
					
				| @ -69,8 +69,8 @@ function displayZipCode( | |||||||
|     const position = convertCoordinateToPixels(center, mapSize); |     const position = convertCoordinateToPixels(center, mapSize); | ||||||
|     const rect = document.getElementById("map")!.getBoundingClientRect(); |     const rect = document.getElementById("map")!.getBoundingClientRect(); | ||||||
|     dot.style.display = "block"; |     dot.style.display = "block"; | ||||||
|     dot.style.left = (position.x + rect.left) + "px"; |     dot.style.left = position.x + rect.left + "px"; | ||||||
|     dot.style.top = (position.y + rect.top) + "px"; |     dot.style.top = position.y + rect.top + document.documentElement.scrollTop + "px"; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function setupMap( | function setupMap( | ||||||
|  | |||||||
| @ -187,7 +187,7 @@ code { | |||||||
|     border: 2px solid black; |     border: 2px solid black; | ||||||
|     background-color: var(--brand); |     background-color: var(--brand); | ||||||
|     filter: drop-shadow(1px 1px 2px black); |     filter: drop-shadow(1px 1px 2px black); | ||||||
|     position: fixed; |     position: absolute; | ||||||
|     display: none; |     display: none; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user