fixup 3dc93436: immediately render a chunk if ScrollY>0
This commit is contained in:
		
							parent
							
								
									68d2aeba69
								
							
						
					
					
						commit
						77ffd3004d
					
				|  | @ -104,9 +104,10 @@ function showStyles(styles = []) { | |||
|     .map(style => ({name: style.name.toLocaleLowerCase(), style})) | ||||
|     .sort((a, b) => (a.name < b.name ? -1 : a.name == b.name ? 0 : 1)); | ||||
|   let index = 0; | ||||
|   const shouldRenderAll = (history.state || {}).scrollY > window.innerHeight; | ||||
|   const scrollY = (history.state || {}).scrollY; | ||||
|   const shouldRenderAll = scrollY > window.innerHeight; | ||||
|   const renderBin = document.createDocumentFragment(); | ||||
|   if (shouldRenderAll) { | ||||
|   if (scrollY) { | ||||
|     renderStyles(); | ||||
|   } else { | ||||
|     requestAnimationFrame(renderStyles); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user