Add Util functions to PDFJS.

This commit is contained in:
Brendan Dahl 2012-04-16 09:45:49 -07:00
parent 459e08d1b4
commit 04c8d1454d
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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';