bug fix: textLayer ready still needs scroll
This commit is contained in:
		
							parent
							
								
									dd0cb37f38
								
							
						
					
					
						commit
						3bd20a7415
					
				| @ -323,14 +323,16 @@ var PDFFindController = { | |||||||
|   updatePage: function(idx) { |   updatePage: function(idx) { | ||||||
|     var page = PDFView.pages[idx]; |     var page = PDFView.pages[idx]; | ||||||
| 
 | 
 | ||||||
|     if (page.textLayer) { |     if (this.selected.pageIdx === idx) { | ||||||
|       page.textLayer.updateMatches(); |  | ||||||
|     } else if (this.selected.pageIdx === idx) { |  | ||||||
|       // If the page is selected, scroll the page into view, which triggers
 |       // If the page is selected, scroll the page into view, which triggers
 | ||||||
|       // rendering the page, which adds the textLayer. Once the textLayer is
 |       // rendering the page, which adds the textLayer. Once the textLayer is
 | ||||||
|       // build, it will scroll onto the selected match.
 |       // build, it will scroll onto the selected match.
 | ||||||
|       page.scrollIntoView(); |       page.scrollIntoView(); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     if (page.textLayer) { | ||||||
|  |       page.textLayer.updateMatches(); | ||||||
|  |     } | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   performFind: function() { |   performFind: function() { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user