mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +02:00
[PDFSidebarResizer] Refactor the clamping in _updateWidth
Rather than manually clamping the `width` here, we can just `export` an already existing helper function from `ui_utils.js` instead. (Hopefully it will eventually be possible to replace this helper function with a native `Math.clamp` function, given that there exists a "Stage 1 Proposal" for adding such a thing to the ECMAScript specification.)
This commit is contained in:
parent
c1cfe2881b
commit
9e4552d792
2 changed files with 7 additions and 11 deletions
|
@ -898,6 +898,7 @@ export {
|
|||
NullL10n,
|
||||
EventBus,
|
||||
getGlobalEventBus,
|
||||
clamp,
|
||||
ProgressBar,
|
||||
getPDFFileNameFromURL,
|
||||
noContextMenuHandler,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue