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

Text shadow is drawn over text underline #1634

Closed
Tom-Aive opened this issue Sep 4, 2023 · 9 comments
Closed

Text shadow is drawn over text underline #1634

Tom-Aive opened this issue Sep 4, 2023 · 9 comments

Comments

@Tom-Aive
Copy link

Tom-Aive commented Sep 4, 2023

Hello everyone,

First of all thanks for the library, it works like a charm.

However I've found an issue in a specific case.
When we use textDecoration: 'underline' on a Text element and add a shadow to it, the shadow is drawn over the underline instead of under it.

Exemple here : https://jsbin.com/rujuzotiqa/edit?html,js,output

@lavrton
Copy link
Member

lavrton commented Sep 4, 2023

It looks like a bug. I am not sure yet what will be the easy fix.

Thanks for the report!

@lavrton lavrton closed this as completed in f39c57d Sep 4, 2023
@lavrton
Copy link
Member

lavrton commented Sep 4, 2023

Actually, I found it and fixed. I will publish release later.

@Tom-Aive
Copy link
Author

Tom-Aive commented Sep 4, 2023

Perfect, thanks for the quick fix.

I was trying to understand what could be the cause (seems like a drawing order or something since the shadow of the underline doesn't cover itself) but I'm too unfamiliar with the implementation of this library to get far enough.

@Tom-Aive
Copy link
Author

Tom-Aive commented Sep 4, 2023

Just a quick note, I made some other test and the issue happens also with textDecoration: 'line-through'.
So your fix might need to be adjusted if I understand it correctly.

@lavrton
Copy link
Member

lavrton commented Sep 4, 2023

Oh, you are right! I forgot about it. Just added that case too.

@Tom-Aive
Copy link
Author

Do you have an ETA for the next release ?

@lavrton
Copy link
Member

lavrton commented Sep 14, 2023

Let's do it today.

@lavrton
Copy link
Member

lavrton commented Sep 14, 2023

Done. Please try it with konva@9.2.1.

@Tom-Aive
Copy link
Author

This fix does work indeed.
Thanks for your time !

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

No branches or pull requests

2 participants