Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### 3.8.0


* [fix] Fix shape hover colors when overlay uses named color (increaseBrightness() accepts names now) <https://github.com/cds-astro/aladin-lite/issues/355>
* [feat] Selected and hovered items (shapes, sources, ...) are rendered at last. <https://github.com/cds-astro/aladin-lite/issues/337>
* [feat] Add selectionLineWidth option for shapes and catalogs. <https://github.com/cds-astro/aladin-lite/pull/354>
* [fix] horizontal/vertical overlay lines appearing correctly <https://github.com/cds-astro/aladin-lite/issues/334>
Expand Down
7 changes: 5 additions & 2 deletions src/js/Overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,15 @@ export let GraphicOverlay = (function() {
*
* @memberof GraphicOverlay
*
* @param {string} hex - The color given in hexadecimal e.g. '#ffa0bb'
* @param {string} color - Any CSS color string (hex e.g. '#ffa0bb', rgb(), named color)
* @param {number} percent - The percentage to increase the brightness of
*
* @returns {string} The new color given as an hexadecimal string
*/
GraphicOverlay.increaseBrightness = function(hex, percent){
GraphicOverlay.increaseBrightness = function(color, percent){
// Normalize the color to hex.
var hex = Color.standardizeColor(color);

// strip the leading # if it's there
hex = hex.replace(/^\s*#|\s*$/g, '');

Expand Down