mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Use the local eventBus
in the AnnotationEditorUIManager
constructor
This shortens the code ever so slightly, which cannot hurt.
This commit is contained in:
parent
038e482760
commit
82735537bf
1 changed files with 5 additions and 13 deletions
|
@ -776,21 +776,13 @@ class AnnotationEditorUIManager {
|
||||||
this.#viewer = viewer;
|
this.#viewer = viewer;
|
||||||
this.#altTextManager = altTextManager;
|
this.#altTextManager = altTextManager;
|
||||||
this._eventBus = eventBus;
|
this._eventBus = eventBus;
|
||||||
this._eventBus._on("editingaction", this.onEditingAction.bind(this), {
|
eventBus._on("editingaction", this.onEditingAction.bind(this), { signal });
|
||||||
signal,
|
eventBus._on("pagechanging", this.onPageChanging.bind(this), { signal });
|
||||||
});
|
eventBus._on("scalechanging", this.onScaleChanging.bind(this), { signal });
|
||||||
this._eventBus._on("pagechanging", this.onPageChanging.bind(this), {
|
eventBus._on("rotationchanging", this.onRotationChanging.bind(this), {
|
||||||
signal,
|
|
||||||
});
|
|
||||||
this._eventBus._on("scalechanging", this.onScaleChanging.bind(this), {
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
this._eventBus._on("rotationchanging", this.onRotationChanging.bind(this), {
|
|
||||||
signal,
|
|
||||||
});
|
|
||||||
this._eventBus._on("setpreference", this.onSetPreference.bind(this), {
|
|
||||||
signal,
|
signal,
|
||||||
});
|
});
|
||||||
|
eventBus._on("setpreference", this.onSetPreference.bind(this), { signal });
|
||||||
this.#addSelectionListener();
|
this.#addSelectionListener();
|
||||||
this.#addDragAndDropListeners();
|
this.#addDragAndDropListeners();
|
||||||
this.#addKeyboardManager();
|
this.#addKeyboardManager();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue