|  |  | @@ -649,8 +649,21 @@ function upgradeTooltip(id, event) { | 
		
	
		
			
			|  |  |  | fillTooltip("upgrade", "prereqs", renderPrereqs(upgrades[id].prereqs)); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | let yOffset = tooltip.parentElement.getBoundingClientRect().y; | 
		
	
		
			
			|  |  |  | let tooltipSize = tooltip.getBoundingClientRect().height; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | let yTrans = Math.round(event.clientY - yOffset); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var body = document.body, | 
		
	
		
			
			|  |  |  | html = document.documentElement; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | var height = Math.max(window.innerHeight); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | yTrans = Math.min(yTrans, height - tooltipSize - 150); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | console.log(height); | 
		
	
		
			
			|  |  |  | console.log(yOffset); | 
		
	
		
			
			|  |  |  | console.log(yTrans); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | tooltip.style.setProperty("transform", "translate(-220px, " + yTrans + "px)"); | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
	
		
			
				|  |  | @@ -693,8 +706,6 @@ function buildingTooltip(id, event) { | 
		
	
		
			
			|  |  |  | fillTooltip("building", "cost", render(costOfBuilding(id)) + " food"); | 
		
	
		
			
			|  |  |  | fillTooltip("building", "prod", prodSummary(id)); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | let yOffset = tooltip.parentElement.getBoundingClientRect().y; | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | let xPos = tooltip.parentElement.getBoundingClientRect().x - 450; | 
		
	
		
			
			|  |  |  |  | 
		
	
		
			
			|  |  |  | // wow browsers are bad | 
		
	
	
		
			
				|  |  | 
 |