[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:
Jonas Jenwald 2019-10-03 12:03:45 +02:00
parent c1cfe2881b
commit 9e4552d792
2 changed files with 7 additions and 11 deletions

View file

@ -898,6 +898,7 @@ export {
NullL10n,
EventBus,
getGlobalEventBus,
clamp,
ProgressBar,
getPDFFileNameFromURL,
noContextMenuHandler,