Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
zamuzakki committed Jan 23, 2025
1 parent 19088f2 commit fb22247
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions django_project/frontend/src/pages/Dashboard/MapLibre/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,21 +311,4 @@ export const hexToRgba = (hex, alpha = 1, format = 'array') => {
}
}
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
};

// /**
// * Convert RGBA to hex
// * @param rgba object
// * @returns hex color with alpha
// */
// export const rgbaToHex = (rgba) => {
// const toHex = (value) => {
// const hex = Math.round(value).toString(16);
// return hex.padStart(2, "0");
// };

// const alpha = Math.round(rgba.a * 255); // Convert alpha to a value between 0-255

// // Combine RGBA components into a single HEX string
// return `#${toHex(rgba.r)}${toHex(rgba.g)}${toHex(rgba.b)}${toHex(alpha)}`;
// }
};

0 comments on commit fb22247

Please sign in to comment.