Open EdnaldoNeimeg opened 2 years ago
add a simple repro to make your issue clear and easy to help
As of now i don't even remember how we trigger the textPath rendering. If we do, definitely shadow should be removed for that. Can you open a fiddle with the code you use for that rendering?
As of now i don't even remember how we trigger the textPath rendering. If we do, definitely shadow should be removed for that. Can you open a fiddle with the code you use for that rendering?
Done. Link on first comment.
I see in the repro that object dimensions are wrong as well and don't include text chars
I see in the repro that object dimensions are wrong as well and don't include text chars
What does it have do to with the "path shadow" issue or the title of the issue?
So ok, now i remember, you put path invisible or visible to have it render. So yes, is a bug. The path shouldn't inherit the shadow from text, if someone wants to had the same shadow will add it to both of the objects.
Showing it on canvasTop is not on the table for now, i m not sure what would solve. We want to move controls on the topCanvas, but the text path is not a decoration of the object in that sense.
I see in the repro that object dimensions are wrong as well and don't include text chars
What does it have do to with the "path shadow" issue or the title of the issue?
Absolutely nothing But it's a bug non the less
If you're drawing the path to use it a guide, a better way is to render the path in the after:render
callback. This fixes the shadow issue, while also making sure that the guide renders above any other objects in the canvas (as guides should)
If you're drawing the path to use it a guide, a better way is to render the path in the
after:render
callback. This fixes the shadow issue, while also making sure that the guide renders above any other objects in the canvas (as guides should)
Well, it is still a bug, although your sulution solves the problem for now.
If you're drawing the path to use it a guide, a better way is to render the path in the
after:render
callback. This fixes the shadow issue, while also making sure that the guide renders above any other objects in the canvas (as guides should)
Looks VERY promissing, but there's a problem when zooming in/out
yes because you should set the zoom back on after render.
The fix should be easy, an additional wrap in ctx.save() and ctx.restore() before drawing the path, and inside the ctx.save() block we set the shadow as the path shadow ( so that you can have it or not have it ). That should make the trick
@EdnaldoNeimeg I've updated the fiddle to correct for zoom. But yes, proper control for separate shadows between text and path should be added.
Showing it on canvasTop is not on the table for now, i m not sure what would solve. We want to move controls on the topCanvas, but the text path is not a decoration of the object in that sense.
hey, is there any plan for this case 'We want to move controls on the topCanvas'?
There was an old PR open for it, but it never got finished/merged. The top canvas seems the natural destination for controls, since you don't want to re-render all the canvas if you have an hover effect on controls, or if your controls do not cause any canvas change ( imagine a control to copy the text content of a textbox or simply selecting an item shouldn't require to redraw all the canvas )
Is not hard at all, is just really about moving the drawing calls for controls on the contextTop, it could be as simple as that. The option controlsAboveOverlay would go away and the ability to put an overlay on top of controls would go away.
It'd be realy cool if text's path could be shown on contextTop. Eventhough the path is not always a part of the text, it cast text's shadows, which is weird when the path is used as just a "follow" line.
A fiddle just for reference: https://jsfiddle.net/Neimeg/315jt6rg/96/
Example below: