mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Change the createPromiseCapability
helper function into a PromiseCapability
class
This is not only slightly more compact, but it also simplifies the handling of the `settled` getter.
This commit is contained in:
parent
f9c2a8d437
commit
317abd6d07
24 changed files with 117 additions and 122 deletions
|
@ -13,8 +13,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createPromiseCapability, PDFDateString } from "pdfjs-lib";
|
||||
import { getPageSizeInches, isPortraitOrientation } from "./ui_utils.js";
|
||||
import { PDFDateString, PromiseCapability } from "pdfjs-lib";
|
||||
|
||||
const DEFAULT_FIELD_CONTENT = "-";
|
||||
|
||||
|
@ -201,7 +201,7 @@ class PDFDocumentProperties {
|
|||
this.pdfDocument = null;
|
||||
|
||||
this.#fieldData = null;
|
||||
this._dataAvailableCapability = createPromiseCapability();
|
||||
this._dataAvailableCapability = new PromiseCapability();
|
||||
this._currentPageNumber = 1;
|
||||
this._pagesRotation = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue