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

Draw transition shows small dot at the beginning of a path #6816

Closed
romaincazier opened this issue Oct 7, 2021 · 2 comments · Fixed by #8094
Closed

Draw transition shows small dot at the beginning of a path #6816

romaincazier opened this issue Oct 7, 2021 · 2 comments · Fixed by #8094
Labels
runtime Changes relating to runtime APIs

Comments

@romaincazier
Copy link

romaincazier commented Oct 7, 2021

Describe the bug

When the stroke-linecap is set to something else than "butt", a small dot is visible at the beginning of a path. This is only visible when applying a delay to the transition. This can be a problem if you have multiple paths and want them to be displayed one after the other.

Proposed solution

(tested locally) The transition could instead rely on stroke-dashoffset. Replace line 201 by:

css: (_t, u) => `
  stroke-dasharray: ${len} ${len};
  stroke-dashoffset: ${u * len};
`

Reproduction

https://svelte.dev/repl/5b62eb46687d4e219b970b38154705fa?version=3.43.1

System Info

Svelte 3.43.1

Severity

annoyance

@Conduitry Conduitry added the runtime Changes relating to runtime APIs label Oct 7, 2021
@bluwy
Copy link
Member

bluwy commented Oct 11, 2021

Confirmed the proposed solution works. The stroke-dasharray can also be simplified as just stroke-dasharray: ${len}. I don't think this would be a breaking change as this seems to be intended behaviour. Feel free to send a PR!

@Conduitry
Copy link
Member

This should be fixed in 3.55.1 - https://svelte.dev/repl/5b62eb46687d4e219b970b38154705fa?version=3.55.1

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

Successfully merging a pull request may close this issue.

3 participants