Skip to content

Commit

Permalink
Merge pull request #19610 from Snuffleupagus/rm-opacityToHex
Browse files Browse the repository at this point in the history
[Editor] Remove the unused `opacityToHex` helper function (PR 19093 follow-up)
  • Loading branch information
Snuffleupagus authored Mar 6, 2025
2 parents dea35ae + 4ec5f08 commit d646b2b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/display/editor/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -2562,5 +2551,4 @@ export {
ColorManager,
CommandManager,
KeyboardManager,
opacityToHex,
};

0 comments on commit d646b2b

Please sign in to comment.