Import getGlobalEventBus
correctly from web/dom_events.js
in various /web
files, to un-break e.g. the viewer components (PR 8203 follow-up)
In PR 8203, I somehow managed to mess up the import of `getGlobalEventBus` in *all* files where it's present; my sincere apologies for this!
This commit is contained in:
parent
009d91d735
commit
79e0745a12
@ -14,11 +14,11 @@
|
|||||||
*/
|
*/
|
||||||
/* globals chrome */
|
/* globals chrome */
|
||||||
|
|
||||||
import { domEvents } from './dom_events';
|
import { getGlobalEventBus } from './dom_events';
|
||||||
|
|
||||||
function PDFHistory(options) {
|
function PDFHistory(options) {
|
||||||
this.linkService = options.linkService;
|
this.linkService = options.linkService;
|
||||||
this.eventBus = options.eventBus || domEvents.getGlobalEventBus();
|
this.eventBus = options.eventBus || getGlobalEventBus();
|
||||||
|
|
||||||
this.initialized = false;
|
this.initialized = false;
|
||||||
this.initialDestination = null;
|
this.initialDestination = null;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { domEvents } from './dom_events';
|
import { getGlobalEventBus } from './dom_events';
|
||||||
import { parseQueryString } from './ui_utils';
|
import { parseQueryString } from './ui_utils';
|
||||||
|
|
||||||
var PageNumberRegExp = /^\d+$/;
|
var PageNumberRegExp = /^\d+$/;
|
||||||
@ -39,7 +39,7 @@ var PDFLinkService = (function PDFLinkServiceClosure() {
|
|||||||
*/
|
*/
|
||||||
function PDFLinkService(options) {
|
function PDFLinkService(options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
this.eventBus = options.eventBus || domEvents.getGlobalEventBus();
|
this.eventBus = options.eventBus || getGlobalEventBus();
|
||||||
this.baseUrl = null;
|
this.baseUrl = null;
|
||||||
this.pdfDocument = null;
|
this.pdfDocument = null;
|
||||||
this.pdfViewer = null;
|
this.pdfViewer = null;
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
createPromiseCapability, CustomStyle, PDFJS, RenderingCancelledException,
|
createPromiseCapability, CustomStyle, PDFJS, RenderingCancelledException,
|
||||||
SVGGraphics
|
SVGGraphics
|
||||||
} from './pdfjs';
|
} from './pdfjs';
|
||||||
import { domEvents } from './dom_events';
|
import { getGlobalEventBus } from './dom_events';
|
||||||
import { RenderingStates } from './pdf_rendering_queue';
|
import { RenderingStates } from './pdf_rendering_queue';
|
||||||
|
|
||||||
var TEXT_LAYER_RENDER_DELAY = 200; // ms
|
var TEXT_LAYER_RENDER_DELAY = 200; // ms
|
||||||
@ -75,7 +75,7 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|||||||
this.enhanceTextSelection = enhanceTextSelection;
|
this.enhanceTextSelection = enhanceTextSelection;
|
||||||
this.renderInteractiveForms = renderInteractiveForms;
|
this.renderInteractiveForms = renderInteractiveForms;
|
||||||
|
|
||||||
this.eventBus = options.eventBus || domEvents.getGlobalEventBus();
|
this.eventBus = options.eventBus || getGlobalEventBus();
|
||||||
this.renderingQueue = renderingQueue;
|
this.renderingQueue = renderingQueue;
|
||||||
this.textLayerFactory = textLayerFactory;
|
this.textLayerFactory = textLayerFactory;
|
||||||
this.annotationLayerFactory = annotationLayerFactory;
|
this.annotationLayerFactory = annotationLayerFactory;
|
||||||
|
@ -21,7 +21,7 @@ import {
|
|||||||
} from './ui_utils';
|
} from './ui_utils';
|
||||||
import { PDFRenderingQueue, RenderingStates } from './pdf_rendering_queue';
|
import { PDFRenderingQueue, RenderingStates } from './pdf_rendering_queue';
|
||||||
import { AnnotationLayerBuilder } from './annotation_layer_builder';
|
import { AnnotationLayerBuilder } from './annotation_layer_builder';
|
||||||
import { domEvents } from './dom_events';
|
import { getGlobalEventBus } from './dom_events';
|
||||||
import { PDFPageView } from './pdf_page_view';
|
import { PDFPageView } from './pdf_page_view';
|
||||||
import { SimpleLinkService } from './pdf_link_service';
|
import { SimpleLinkService } from './pdf_link_service';
|
||||||
import { TextLayerBuilder } from './text_layer_builder';
|
import { TextLayerBuilder } from './text_layer_builder';
|
||||||
@ -106,7 +106,7 @@ var PDFViewer = (function pdfViewer() {
|
|||||||
function PDFViewer(options) {
|
function PDFViewer(options) {
|
||||||
this.container = options.container;
|
this.container = options.container;
|
||||||
this.viewer = options.viewer || options.container.firstElementChild;
|
this.viewer = options.viewer || options.container.firstElementChild;
|
||||||
this.eventBus = options.eventBus || domEvents.getGlobalEventBus();
|
this.eventBus = options.eventBus || getGlobalEventBus();
|
||||||
this.linkService = options.linkService || new SimpleLinkService();
|
this.linkService = options.linkService || new SimpleLinkService();
|
||||||
this.downloadManager = options.downloadManager || null;
|
this.downloadManager = options.downloadManager || null;
|
||||||
this.removePageBorders = options.removePageBorders || false;
|
this.removePageBorders = options.removePageBorders || false;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { domEvents } from './dom_events';
|
import { getGlobalEventBus } from './dom_events';
|
||||||
import { renderTextLayer } from './pdfjs';
|
import { renderTextLayer } from './pdfjs';
|
||||||
|
|
||||||
var EXPAND_DIVS_TIMEOUT = 300; // ms
|
var EXPAND_DIVS_TIMEOUT = 300; // ms
|
||||||
@ -39,7 +39,7 @@ var EXPAND_DIVS_TIMEOUT = 300; // ms
|
|||||||
var TextLayerBuilder = (function TextLayerBuilderClosure() {
|
var TextLayerBuilder = (function TextLayerBuilderClosure() {
|
||||||
function TextLayerBuilder(options) {
|
function TextLayerBuilder(options) {
|
||||||
this.textLayerDiv = options.textLayerDiv;
|
this.textLayerDiv = options.textLayerDiv;
|
||||||
this.eventBus = options.eventBus || domEvents.getGlobalEventBus();
|
this.eventBus = options.eventBus || getGlobalEventBus();
|
||||||
this.textContent = null;
|
this.textContent = null;
|
||||||
this.renderingDone = false;
|
this.renderingDone = false;
|
||||||
this.pageIdx = options.pageIndex;
|
this.pageIdx = options.pageIndex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user