Add Util functions to PDFJS.
This commit is contained in:
		
							parent
							
								
									459e08d1b4
								
							
						
					
					
						commit
						04c8d1454d
					
				| @ -76,7 +76,7 @@ function stringToBytes(str) { | ||||
| 
 | ||||
| var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; | ||||
| 
 | ||||
| var Util = (function UtilClosure() { | ||||
| var Util = PDFJS.Util = (function UtilClosure() { | ||||
|   function Util() {} | ||||
| 
 | ||||
|   Util.makeCssRgb = function Util_makeCssRgb(r, g, b) { | ||||
|  | ||||
| @ -787,7 +787,7 @@ var PageView = function pageView(container, pdfPage, id, scale, | ||||
|     } | ||||
|     function createElementWithStyle(tagName, item) { | ||||
|       var rect = viewport.convertToViewportRectangle(item.rect); | ||||
|       rect = Util.normalizeRect(rect); | ||||
|       rect = PDFJS.Util.normalizeRect(rect); | ||||
|       var element = document.createElement(tagName); | ||||
|       element.style.left = Math.floor(rect[0]) + 'px'; | ||||
|       element.style.top = Math.floor(rect[1]) + 'px'; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user