Browse Source

PDF.js version 1.8.337 - See mozilla/pdf.js@595ee1232dee3525201672b54b2e72cd7dbf33ff

master v1.8.337
pdfjsbot 8 years ago
parent
commit
2bd83ccce8
  1. 2
      bower.json
  2. 12
      build/pdf.combined.js
  3. 2
      build/pdf.combined.js.map
  4. 12
      build/pdf.js
  5. 2
      build/pdf.js.map
  6. 6
      build/pdf.min.js
  7. 4
      build/pdf.worker.js
  8. 2
      build/pdf.worker.js.map
  9. 4
      lib/display/api.js
  10. 4
      lib/display/global.js
  11. 4
      lib/pdf.js
  12. 4
      lib/pdf.worker.js
  13. 54
      lib/web/hand_tool.js
  14. 117
      lib/web/interfaces.js
  15. 95
      lib/web/secondary_toolbar.js
  16. 2
      package.json

2
bower.json

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

12
build/pdf.combined.js

@ -12779,8 +12779,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -12779,8 +12779,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.8.333';
exports.build = build = '3923c4a6';
exports.version = version = '1.8.337';
exports.build = build = '595ee123';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -28185,8 +28185,8 @@ if (!_util.globalScope.PDFJS) { @@ -28185,8 +28185,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util.globalScope.PDFJS;
{
PDFJS.version = '1.8.333';
PDFJS.build = '3923c4a6';
PDFJS.version = '1.8.337';
PDFJS.build = '595ee123';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -43772,8 +43772,8 @@ exports.TilingPattern = TilingPattern; @@ -43772,8 +43772,8 @@ exports.TilingPattern = TilingPattern;
"use strict";
var pdfjsVersion = '1.8.333';
var pdfjsBuild = '3923c4a6';
var pdfjsVersion = '1.8.337';
var pdfjsBuild = '595ee123';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(26);
var pdfjsDisplayAPI = __w_pdfjs_require__(10);

2
build/pdf.combined.js.map

File diff suppressed because one or more lines are too long

12
build/pdf.js

@ -3486,8 +3486,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -3486,8 +3486,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.8.333';
exports.build = build = '3923c4a6';
exports.version = version = '1.8.337';
exports.build = build = '595ee123';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;
@ -5460,8 +5460,8 @@ if (!_util.globalScope.PDFJS) { @@ -5460,8 +5460,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util.globalScope.PDFJS;
{
PDFJS.version = '1.8.333';
PDFJS.build = '3923c4a6';
PDFJS.version = '1.8.337';
PDFJS.build = '595ee123';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {
@ -7956,8 +7956,8 @@ exports.TilingPattern = TilingPattern; @@ -7956,8 +7956,8 @@ exports.TilingPattern = TilingPattern;
"use strict";
var pdfjsVersion = '1.8.333';
var pdfjsBuild = '3923c4a6';
var pdfjsVersion = '1.8.337';
var pdfjsBuild = '595ee123';
var pdfjsSharedUtil = __w_pdfjs_require__(0);
var pdfjsDisplayGlobal = __w_pdfjs_require__(9);
var pdfjsDisplayAPI = __w_pdfjs_require__(3);

2
build/pdf.js.map

File diff suppressed because one or more lines are too long

6
build/pdf.min.js vendored

File diff suppressed because one or more lines are too long

4
build/pdf.worker.js vendored

@ -37137,8 +37137,8 @@ exports.Type1Parser = Type1Parser; @@ -37137,8 +37137,8 @@ exports.Type1Parser = Type1Parser;
"use strict";
var pdfjsVersion = '1.8.333';
var pdfjsBuild = '3923c4a6';
var pdfjsVersion = '1.8.337';
var pdfjsBuild = '595ee123';
var pdfjsCoreWorker = __w_pdfjs_require__(8);
{
__w_pdfjs_require__(19);

2
build/pdf.worker.js.map vendored

File diff suppressed because one or more lines are too long

4
lib/display/api.js

@ -1405,8 +1405,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() { @@ -1405,8 +1405,8 @@ var _UnsupportedManager = function UnsupportedManagerClosure() {
}();
var version, build;
{
exports.version = version = '1.8.333';
exports.build = build = '3923c4a6';
exports.version = version = '1.8.337';
exports.build = build = '595ee123';
}
exports.getDocument = getDocument;
exports.LoopbackPort = LoopbackPort;

4
lib/display/global.js

@ -39,8 +39,8 @@ if (!_util.globalScope.PDFJS) { @@ -39,8 +39,8 @@ if (!_util.globalScope.PDFJS) {
}
var PDFJS = _util.globalScope.PDFJS;
{
PDFJS.version = '1.8.333';
PDFJS.build = '3923c4a6';
PDFJS.version = '1.8.337';
PDFJS.build = '595ee123';
}
PDFJS.pdfBug = false;
if (PDFJS.verbosity !== undefined) {

4
lib/pdf.js

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.8.333';
var pdfjsBuild = '3923c4a6';
var pdfjsVersion = '1.8.337';
var pdfjsBuild = '595ee123';
var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayGlobal = require('./display/global.js');
var pdfjsDisplayAPI = require('./display/api.js');

4
lib/pdf.worker.js vendored

@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
*/
'use strict';
var pdfjsVersion = '1.8.333';
var pdfjsBuild = '3923c4a6';
var pdfjsVersion = '1.8.337';
var pdfjsBuild = '595ee123';
var pdfjsCoreWorker = require('./core/worker.js');
{
require('./core/network.js');

54
lib/web/hand_tool.js

@ -19,17 +19,26 @@ Object.defineProperty(exports, "__esModule", { @@ -19,17 +19,26 @@ Object.defineProperty(exports, "__esModule", {
});
exports.HandTool = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _grab_to_pan = require('./grab_to_pan');
var _ui_utils = require('./ui_utils');
var HandTool = function HandToolClosure() {
function HandTool(options) {
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var HandTool = function () {
function HandTool(_ref) {
var _this = this;
this.container = options.container;
this.eventBus = options.eventBus;
var preferences = options.preferences;
var container = _ref.container,
eventBus = _ref.eventBus,
preferences = _ref.preferences;
_classCallCheck(this, HandTool);
this.container = container;
this.eventBus = eventBus;
this.wasActive = false;
this.handTool = new _grab_to_pan.GrabToPan({
element: this.container,
@ -38,11 +47,12 @@ var HandTool = function HandToolClosure() { @@ -38,11 +47,12 @@ var HandTool = function HandToolClosure() {
}
});
this.eventBus.on('togglehandtool', this.toggle.bind(this));
Promise.all([_ui_utils.localized, preferences.get('enableHandToolOnLoad')]).then(function (values) {
var enableOnLoad = preferences.get('enableHandToolOnLoad');
Promise.all([_ui_utils.localized, enableOnLoad]).then(function (values) {
if (values[1] === true) {
_this.handTool.activate();
}
}).catch(function rejected(reason) {});
}).catch(function (reason) {});
this.eventBus.on('presentationmodechanged', function (evt) {
if (evt.switchInProgress) {
return;
@ -54,26 +64,36 @@ var HandTool = function HandToolClosure() { @@ -54,26 +64,36 @@ var HandTool = function HandToolClosure() {
}
});
}
HandTool.prototype = {
get isActive() {
return !!this.handTool.active;
},
toggle: function HandTool_toggle() {
_createClass(HandTool, [{
key: 'toggle',
value: function toggle() {
this.handTool.toggle();
},
enterPresentationMode: function HandTool_enterPresentationMode() {
}
}, {
key: 'enterPresentationMode',
value: function enterPresentationMode() {
if (this.isActive) {
this.wasActive = true;
this.handTool.deactivate();
}
},
exitPresentationMode: function HandTool_exitPresentationMode() {
}
}, {
key: 'exitPresentationMode',
value: function exitPresentationMode() {
if (this.wasActive) {
this.wasActive = false;
this.handTool.activate();
}
}
};
}, {
key: 'isActive',
get: function get() {
return !!this.handTool.active;
}
}]);
return HandTool;
}();
exports.HandTool = HandTool;

117
lib/web/interfaces.js

@ -18,37 +18,96 @@ var _createClass = function () { function defineProperties(target, props) { for @@ -18,37 +18,96 @@ var _createClass = function () { function defineProperties(target, props) { for
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function IPDFLinkService() {}
IPDFLinkService.prototype = {
get page() {},
set page(value) {},
navigateTo: function navigateTo(dest) {},
getDestinationHash: function getDestinationHash(dest) {},
getAnchorUrl: function getAnchorUrl(hash) {},
setHash: function setHash(hash) {},
executeNamedAction: function executeNamedAction(action) {},
cachePageRef: function cachePageRef(pageNum, pageRef) {}
};
function IPDFHistory() {}
IPDFHistory.prototype = {
forward: function forward() {},
back: function back() {},
push: function push(params) {},
updateNextHashParam: function updateNextHashParam(hash) {}
};
function IRenderableView() {}
IRenderableView.prototype = {
get renderingId() {},
get renderingState() {},
draw: function draw() {},
resume: function resume() {}
};
function IPDFTextLayerFactory() {}
IPDFTextLayerFactory.prototype = {
createTextLayerBuilder: function createTextLayerBuilder(textLayerDiv, pageIndex, viewport) {
var IPDFLinkService = function () {
function IPDFLinkService() {
_classCallCheck(this, IPDFLinkService);
}
_createClass(IPDFLinkService, [{
key: 'navigateTo',
value: function navigateTo(dest) {}
}, {
key: 'getDestinationHash',
value: function getDestinationHash(dest) {}
}, {
key: 'getAnchorUrl',
value: function getAnchorUrl(hash) {}
}, {
key: 'setHash',
value: function setHash(hash) {}
}, {
key: 'executeNamedAction',
value: function executeNamedAction(action) {}
}, {
key: 'cachePageRef',
value: function cachePageRef(pageNum, pageRef) {}
}, {
key: 'page',
get: function get() {},
set: function set(value) {}
}]);
return IPDFLinkService;
}();
var IPDFHistory = function () {
function IPDFHistory() {
_classCallCheck(this, IPDFHistory);
}
_createClass(IPDFHistory, [{
key: 'forward',
value: function forward() {}
}, {
key: 'back',
value: function back() {}
}, {
key: 'push',
value: function push(params) {}
}, {
key: 'updateNextHashParam',
value: function updateNextHashParam(hash) {}
}]);
return IPDFHistory;
}();
var IRenderableView = function () {
function IRenderableView() {
_classCallCheck(this, IRenderableView);
}
_createClass(IRenderableView, [{
key: 'draw',
value: function draw() {}
}, {
key: 'resume',
value: function resume() {}
}, {
key: 'renderingId',
get: function get() {}
}, {
key: 'renderingState',
get: function get() {}
}]);
return IRenderableView;
}();
var IPDFTextLayerFactory = function () {
function IPDFTextLayerFactory() {
_classCallCheck(this, IPDFTextLayerFactory);
}
_createClass(IPDFTextLayerFactory, [{
key: 'createTextLayerBuilder',
value: function createTextLayerBuilder(textLayerDiv, pageIndex, viewport) {
var enhanceTextSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
}
};
}]);
return IPDFTextLayerFactory;
}();
var IPDFAnnotationLayerFactory = function () {
function IPDFAnnotationLayerFactory() {

95
lib/web/secondary_toolbar.js

@ -19,10 +19,16 @@ Object.defineProperty(exports, "__esModule", { @@ -19,10 +19,16 @@ Object.defineProperty(exports, "__esModule", {
});
exports.SecondaryToolbar = undefined;
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _ui_utils = require('./ui_utils');
var SecondaryToolbar = function SecondaryToolbarClosure() {
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var SecondaryToolbar = function () {
function SecondaryToolbar(options, mainContainer, eventBus) {
_classCallCheck(this, SecondaryToolbar);
this.toolbar = options.toolbar;
this.toggleButton = options.toggleButton;
this.toolbarButtonContainer = options.toolbarButtonContainer;
@ -87,31 +93,37 @@ var SecondaryToolbar = function SecondaryToolbarClosure() { @@ -87,31 +93,37 @@ var SecondaryToolbar = function SecondaryToolbarClosure() {
this._bindHandToolListener(options.toggleHandToolButton);
this.eventBus.on('resize', this._setMaxHeight.bind(this));
}
SecondaryToolbar.prototype = {
get isOpen() {
return this.opened;
},
setPageNumber: function SecondaryToolbar_setPageNumber(pageNumber) {
_createClass(SecondaryToolbar, [{
key: 'setPageNumber',
value: function setPageNumber(pageNumber) {
this.pageNumber = pageNumber;
this._updateUIState();
},
setPagesCount: function SecondaryToolbar_setPagesCount(pagesCount) {
}
}, {
key: 'setPagesCount',
value: function setPagesCount(pagesCount) {
this.pagesCount = pagesCount;
this._updateUIState();
},
reset: function SecondaryToolbar_reset() {
}
}, {
key: 'reset',
value: function reset() {
this.pageNumber = 0;
this.pagesCount = 0;
this._updateUIState();
},
_updateUIState: function SecondaryToolbar_updateUIState() {
var items = this.items;
items.firstPage.disabled = this.pageNumber <= 1;
items.lastPage.disabled = this.pageNumber >= this.pagesCount;
items.pageRotateCw.disabled = this.pagesCount === 0;
items.pageRotateCcw.disabled = this.pagesCount === 0;
},
_bindClickListeners: function SecondaryToolbar_bindClickListeners() {
}
}, {
key: '_updateUIState',
value: function _updateUIState() {
this.items.firstPage.disabled = this.pageNumber <= 1;
this.items.lastPage.disabled = this.pageNumber >= this.pagesCount;
this.items.pageRotateCw.disabled = this.pagesCount === 0;
this.items.pageRotateCcw.disabled = this.pagesCount === 0;
}
}, {
key: '_bindClickListeners',
value: function _bindClickListeners() {
var _this = this;
this.toggleButton.addEventListener('click', this.toggle.bind(this));
@ -135,14 +147,16 @@ var SecondaryToolbar = function SecondaryToolbarClosure() { @@ -135,14 +147,16 @@ var SecondaryToolbar = function SecondaryToolbarClosure() {
for (var button in this.buttons) {
_loop(button);
}
},
_bindHandToolListener: function SecondaryToolbar_bindHandToolListener(toggleHandToolButton) {
}
}, {
key: '_bindHandToolListener',
value: function _bindHandToolListener(toggleHandToolButton) {
var isHandToolActive = false;
this.eventBus.on('handtoolchanged', function (e) {
if (isHandToolActive === e.isActive) {
this.eventBus.on('handtoolchanged', function (evt) {
if (isHandToolActive === evt.isActive) {
return;
}
isHandToolActive = e.isActive;
isHandToolActive = evt.isActive;
if (isHandToolActive) {
toggleHandToolButton.title = _ui_utils.mozL10n.get('hand_tool_disable.title', null, 'Disable hand tool');
toggleHandToolButton.firstElementChild.textContent = _ui_utils.mozL10n.get('hand_tool_disable_label', null, 'Disable hand tool');
@ -151,8 +165,10 @@ var SecondaryToolbar = function SecondaryToolbarClosure() { @@ -151,8 +165,10 @@ var SecondaryToolbar = function SecondaryToolbarClosure() {
toggleHandToolButton.firstElementChild.textContent = _ui_utils.mozL10n.get('hand_tool_enable_label', null, 'Enable hand tool');
}
});
},
open: function SecondaryToolbar_open() {
}
}, {
key: 'open',
value: function open() {
if (this.opened) {
return;
}
@ -160,23 +176,29 @@ var SecondaryToolbar = function SecondaryToolbarClosure() { @@ -160,23 +176,29 @@ var SecondaryToolbar = function SecondaryToolbarClosure() {
this._setMaxHeight();
this.toggleButton.classList.add('toggled');
this.toolbar.classList.remove('hidden');
},
close: function SecondaryToolbar_close() {
}
}, {
key: 'close',
value: function close() {
if (!this.opened) {
return;
}
this.opened = false;
this.toolbar.classList.add('hidden');
this.toggleButton.classList.remove('toggled');
},
toggle: function SecondaryToolbar_toggle() {
}
}, {
key: 'toggle',
value: function toggle() {
if (this.opened) {
this.close();
} else {
this.open();
}
},
_setMaxHeight: function SecondaryToolbar_setMaxHeight() {
}
}, {
key: '_setMaxHeight',
value: function _setMaxHeight() {
if (!this.opened) {
return;
}
@ -187,7 +209,14 @@ var SecondaryToolbar = function SecondaryToolbarClosure() { @@ -187,7 +209,14 @@ var SecondaryToolbar = function SecondaryToolbarClosure() {
this.toolbarButtonContainer.setAttribute('style', 'max-height: ' + (this.containerHeight - _ui_utils.SCROLLBAR_PADDING) + 'px;');
this.previousContainerHeight = this.containerHeight;
}
};
}, {
key: 'isOpen',
get: function get() {
return this.opened;
}
}]);
return SecondaryToolbar;
}();
exports.SecondaryToolbar = SecondaryToolbar;

2
package.json

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
{
"name": "pdfjs-dist",
"version": "1.8.333",
"version": "1.8.337",
"main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.",
"keywords": [

Loading…
Cancel
Save