forked from Botanical/BotanJS
		
	Try not to trigger excessive style re-calc
This commit is contained in:
		@@ -243,7 +243,7 @@
 | 
			
		||||
			{
 | 
			
		||||
				var p = wsupp.scrollTop / ( wsupp.scrollHeight - wsupp.clientHeight );
 | 
			
		||||
				cp = 0.75 * cp  + 0.25 * p;
 | 
			
		||||
				bWrapper.style.backgroundPosition = "50% " + cp * 100 + "%";
 | 
			
		||||
				bWrapper.style.backgroundPosition = "50% " + ( cp * 100 ).toFixed( 2 ) + "%";
 | 
			
		||||
			}
 | 
			
		||||
			, 15
 | 
			
		||||
		);
 | 
			
		||||
 
 | 
			
		||||
@@ -78,7 +78,7 @@
 | 
			
		||||
					for(var j = 0, k; j < s.length; j ++)
 | 
			
		||||
					{
 | 
			
		||||
						k = s[j];
 | 
			
		||||
						k.element.style.top = String(-k.verticalRange*((j + 1)*cp)) + "%";
 | 
			
		||||
						k.element.style.top = ( -k.verticalRange * ( ( j + 1 ) * cp ) ).toFixed( 2 ) + "%";
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user