Browse Source

PDF.js version 1.1.284

master v1.1.284
Pdf Bot 10 years ago
parent
commit
73f7fbe01c
  1. 2
      bower.json
  2. 4
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 4
      build/pdf.worker.js
  5. 2
      package.json
  6. 103
      web/pdf_viewer.css
  7. 27
      web/pdf_viewer.js

2
bower.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.1.280",
"version": "1.1.284",
"main": [
"build/pdf.js",
"build/pdf.worker.js"

4
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.1.280';
PDFJS.build = '7d4303b';
PDFJS.version = '1.1.284';
PDFJS.build = '535b7c2';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.1.280';
PDFJS.build = '7d4303b';
PDFJS.version = '1.1.284';
PDFJS.build = '535b7c2';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it

4
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}
PDFJS.version = '1.1.280';
PDFJS.build = '7d4303b';
PDFJS.version = '1.1.284';
PDFJS.build = '535b7c2';
(function pdfjsWrapper() {
// Use strict in our context only - users might not want it

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.1.280",
"version": "1.1.284",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [
"Mozilla",

103
web/pdf_viewer.css

@ -62,6 +62,58 @@ @@ -62,6 +62,58 @@
.textLayer ::selection { background: rgb(0,0,255); }
.textLayer ::-moz-selection { background: rgb(0,0,255); }
.annotationLayer .annotLink > a:hover {
opacity: 0.2;
background: #ff0;
box-shadow: 0px 2px 10px #ff0;
}
.annotationLayer .annotText > img {
position: absolute;
cursor: pointer;
}
.annotationLayer .annotTextContentWrapper {
position: absolute;
width: 20em;
}
.annotationLayer .annotTextContent {
z-index: 200;
float: left;
max-width: 20em;
background-color: #FFFF99;
box-shadow: 0px 2px 5px #333;
border-radius: 2px;
padding: 0.6em;
cursor: pointer;
}
.annotationLayer .annotTextContent > h1 {
font-size: 1em;
border-bottom: 1px solid #000000;
padding-bottom: 0.2em;
}
.annotationLayer .annotTextContent > p {
padding-top: 0.2em;
}
.annotationLayer .annotLink > a {
position: absolute;
font-size: 1em;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.annotationLayer .annotLink > a /* -ms-a */ {
background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAA\
LAAAAAABAAEAAAIBRAA7") 0 0 repeat;
}
.pdfViewer .canvasWrapper {
overflow: hidden;
}
@ -99,12 +151,6 @@ @@ -99,12 +151,6 @@
background: url('images/loading-icon.gif') center no-repeat;
}
.pdfViewer .page .annotLink > a:hover {
opacity: 0.2;
background: #ff0;
box-shadow: 0px 2px 10px #ff0;
}
.pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
margin-bottom: 100%;
border: 0;
@ -124,48 +170,3 @@ @@ -124,48 +170,3 @@
margin-bottom: 100%;
border: 0;
}
.pdfViewer .page .annotText > img {
position: absolute;
cursor: pointer;
}
.pdfViewer .page .annotTextContentWrapper {
position: absolute;
width: 20em;
}
.pdfViewer .page .annotTextContent {
z-index: 200;
float: left;
max-width: 20em;
background-color: #FFFF99;
box-shadow: 0px 2px 5px #333;
border-radius: 2px;
padding: 0.6em;
cursor: pointer;
}
.pdfViewer .page .annotTextContent > h1 {
font-size: 1em;
border-bottom: 1px solid #000000;
padding-bottom: 0.2em;
}
.pdfViewer .page .annotTextContent > p {
padding-top: 0.2em;
}
.pdfViewer .page .annotLink > a {
position: absolute;
font-size: 1em;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.pdfViewer .page .annotLink > a /* -ms-a */ {
background: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAA\
LAAAAAABAAEAAAIBRAA7") 0 0 repeat;
}

27
web/pdf_viewer.js

@ -1962,7 +1962,8 @@ DefaultAnnotationsLayerFactory.prototype = { @@ -1962,7 +1962,8 @@ DefaultAnnotationsLayerFactory.prototype = {
createAnnotationsLayerBuilder: function (pageDiv, pdfPage) {
return new AnnotationsLayerBuilder({
pageDiv: pageDiv,
pdfPage: pdfPage
pdfPage: pdfPage,
linkService: new SimpleLinkService(),
});
}
};
@ -2024,7 +2025,7 @@ var PDFViewer = (function pdfViewer() { @@ -2024,7 +2025,7 @@ var PDFViewer = (function pdfViewer() {
function PDFViewer(options) {
this.container = options.container;
this.viewer = options.viewer || options.container.firstElementChild;
this.linkService = options.linkService || new SimpleLinkService(this);
this.linkService = options.linkService || new SimpleLinkService();
this.removePageBorders = options.removePageBorders || false;
this.defaultRenderingQueue = !options.renderingQueue;
@ -2399,14 +2400,14 @@ var PDFViewer = (function pdfViewer() { @@ -2399,14 +2400,14 @@ var PDFViewer = (function pdfViewer() {
var pageView = this._pages[pageNumber - 1];
if (this.isInPresentationMode) {
if (this.linkService.page !== pageView.id) {
if (this._currentPageNumber !== pageView.id) {
// Avoid breaking getVisiblePages in presentation mode.
this.linkService.page = pageView.id;
this.currentPageNumber = pageView.id;
return;
}
dest = null;
// Fixes the case when PDF has different page sizes.
this._setScale(this.currentScaleValue, true);
this._setScale(this._currentScaleValue, true);
}
if (!dest) {
scrollIntoView(pageView.div);
@ -2454,13 +2455,12 @@ var PDFViewer = (function pdfViewer() { @@ -2454,13 +2455,12 @@ var PDFViewer = (function pdfViewer() {
y = dest[3];
width = dest[4] - x;
height = dest[5] - y;
var viewerContainer = this.container;
var hPadding = this.removePageBorders ? 0 : SCROLLBAR_PADDING;
var vPadding = this.removePageBorders ? 0 : VERTICAL_PADDING;
widthScale = (viewerContainer.clientWidth - hPadding) /
widthScale = (this.container.clientWidth - hPadding) /
width / CSS_UNITS;
heightScale = (viewerContainer.clientHeight - vPadding) /
heightScale = (this.container.clientHeight - vPadding) /
height / CSS_UNITS;
scale = Math.min(Math.abs(widthScale), Math.abs(heightScale));
break;
@ -2689,22 +2689,19 @@ var PDFViewer = (function pdfViewer() { @@ -2689,22 +2689,19 @@ var PDFViewer = (function pdfViewer() {
})();
var SimpleLinkService = (function SimpleLinkServiceClosure() {
function SimpleLinkService(pdfViewer) {
this.pdfViewer = pdfViewer;
}
function SimpleLinkService() {}
SimpleLinkService.prototype = {
/**
* @returns {number}
*/
get page() {
return this.pdfViewer.currentPageNumber;
return 0;
},
/**
* @param {number} value
*/
set page(value) {
this.pdfViewer.currentPageNumber = value;
},
set page(value) {},
/**
* @param dest - The PDF destination object.
*/

Loading…
Cancel
Save