mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #1546 from brendandahl/api
Expose Util functions for Viewer
This commit is contained in:
commit
086f7cc32b
2 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue