Skip to content

Commit

Permalink
Update type documentations for mozilla#16307, mozilla#16359 and mozil…
Browse files Browse the repository at this point in the history
  • Loading branch information
SebCorbin committed Apr 27, 2023
1 parent 4dee3b8 commit a7cf28b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
8 changes: 8 additions & 0 deletions web/pdf_find_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,14 @@ class PDFFindController {
});
}

/**
* Updates scroll so that the match appears into view.
*
* @param {HTMLElement} element
* @param {number} selectedLeft
* @param {number} pageIndex
* @param {number} matchIndex
*/
scrollMatchIntoView({
element = null,
selectedLeft = 0,
Expand Down
16 changes: 16 additions & 0 deletions web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,22 @@ class PDFPageView {
}
}

/**
* @typedef {Object} PDFPageViewUpdateParameters
*
* @property {number} [scale] The new scale, if specified.
* @property {number} [rotation] The new rotation, if specified.
* @property {Promise<OptionalContentConfig>} [optionalContentConfigPromise]
* A promise that is resolved with an {@link OptionalContentConfig} instance.
* The default value is `null`.
* @property {number} [drawingDelay]
*/

/**
* Update page view by eitheir modifiying scale or rotation.
*
* @param {PDFPageViewUpdateParameters}
*/
update({
scale = 0,
rotation = null,
Expand Down
6 changes: 4 additions & 2 deletions web/ui_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ class OutputScale {

/**
* Scrolls specified element into view of its parent.
* @param {Object} element - The element to be visible.
* @param {Object} spot - An object with optional top and left properties,
* @param {HTMLElement} element - The element to be visible.
* @param {Object} [spot] - An object with optional top and left properties,
* specifying the offset from the top left edge.
* @param {number} [spot.left]
* @param {number} [spot.top]
* @param {boolean} [scrollMatches] - When scrolling search results into view,
* ignore elements that either: Contains marked content identifiers,
* or have the CSS-rule `overflow: hidden;` set. The default value is `false`.
Expand Down

0 comments on commit a7cf28b

Please sign in to comment.