Skip to content

feat: normalize dash style in zrender.#628

Merged
pissang merged 9 commits into
ecomfe:nextfrom
plainheart:normalize-dash
Aug 24, 2020
Merged

feat: normalize dash style in zrender.#628
pissang merged 9 commits into
ecomfe:nextfrom
plainheart:normalize-dash

Conversation

@plainheart
Copy link
Copy Markdown
Collaborator

@plainheart plainheart commented Aug 17, 2020

Comment thread src/canvas/graphic.ts
Comment thread src/canvas/graphic.ts Outdated
Comment thread src/graphic/helper/dashStyle.ts
Comment thread src/graphic/helper/dashStyle.ts
Comment thread src/svg/graphic.ts
@plainheart
Copy link
Copy Markdown
Collaborator Author

plainheart commented Aug 18, 2020

I found there may be something wrong with canvas renderer. The legend symbol also have dash style. This is not expected.
I'm not sure how to fix them.

image

@pissang
Copy link
Copy Markdown
Contributor

pissang commented Aug 20, 2020

I guess it's because the state set by setLineDash in brushText leak to the brushPath.

In brushPath it will use setLineDash([]) to restore the line dash state if it's changed in

ctx.setLineDash([]);

It seems brushText doesn't do that.

@plainheart plainheart requested a review from pissang August 21, 2020 03:03
@plainheart
Copy link
Copy Markdown
Collaborator Author

I just made a commit and should I move the added logic to if (text) block?

@pissang
Copy link
Copy Markdown
Contributor

pissang commented Aug 24, 2020

@plainheart Yeah I think it will be slightly better

@plainheart
Copy link
Copy Markdown
Collaborator Author

@pissang Done. Please help review it again.

@pissang pissang merged commit 285b489 into ecomfe:next Aug 24, 2020
@plainheart plainheart deleted the normalize-dash branch January 29, 2021 10:49
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.

2 participants