1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 14:48:08 +02:00

Merge pull request #19610 from Snuffleupagus/rm-opacityToHex

[Editor] Remove the unused `opacityToHex` helper function (PR 19093 follow-up)
This commit is contained in:
Jonas Jenwald 2025-03-06 15:42:38 +01:00 committed by GitHub
commit d646b2b270
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -42,17 +42,6 @@ function bindEvents(obj, element, names) {
}
}
/**
* Convert a number between 0 and 100 into an hex number between 0 and 255.
* @param {number} opacity
* @return {string}
*/
function opacityToHex(opacity) {
return Math.round(Math.min(255, Math.max(1, 255 * opacity)))
.toString(16)
.padStart(2, "0");
}
/**
* Class to create some unique ids for the different editors.
*/
@ -2562,5 +2551,4 @@ export {
ColorManager,
CommandManager,
KeyboardManager,
opacityToHex,
};