Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix(annotation): annotationEdit initialise to the last color, drawType & force hex color comparaison to upper case #2557

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

panaC
Copy link
Member

@panaC panaC commented Sep 20, 2024

Fixes #2548

@panaC panaC self-assigned this Sep 20, 2024
@panaC panaC merged commit 634715d into develop Sep 20, 2024
7 checks passed
@panaC panaC deleted the fix/annoEditInitalState branch September 20, 2024 11:45
@danielweck
Copy link
Member

Just in case Thorium receives a colour code from an external source, note that the RGB HEX syntax isn't necessarily #RRGGBB, see:

https://developer.mozilla.org/en-US/docs/Web/CSS/hex-color

In other words, the hexToRgb() regular expression will break with all other RGB HEX syntaxes. This might not be a problem right now if the function only consumes strings from Thorium itself, where the RGB HEX syntax is only #RRGGBB :)

@danielweck
Copy link
Member

PS: in the highlights engine I just use rgb(rrr, ggg, bbb) instead of #RRGGBB as this doesn't need any format conversion, I can just pass the raw numbers from the IColor struct.
That being said, the RGB HEX syntax is of course easier to store in persistent state of during import/export stages, which I guess is why the conversion takes place?

@panaC
Copy link
Member Author

panaC commented Sep 23, 2024

Indeed ! Thanks you for your precision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: annotation edit popover not initialize with the color and drawType in readerConfig
2 participants