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(brush): clamp range when brush #14569

Merged
merged 4 commits into from
Apr 25, 2021
Merged

Fix(brush): clamp range when brush #14569

merged 4 commits into from
Apr 25, 2021

Conversation

susiwen8
Copy link
Contributor

@susiwen8 susiwen8 commented Mar 31, 2021

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

It should clamp range when brush, otherwise, range would larger than 1, because brushed area might exceed the last item.

Fixed issues

Close #14416

Details

Before: What was the problem?

Kapture 2021-03-31 at 17 35 49

After: How is it fixed in this PR?

Kapture 2021-03-31 at 17 37 21

Usage

Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs

brush3.html

Others

Merging options

  • Please squash the commits into a single one when merge.

Other information

@echarts-bot
Copy link

echarts-bot bot commented Mar 31, 2021

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@susiwen8 susiwen8 requested review from 100pah and pissang April 1, 2021 02:41
@pissang pissang added this to the 5.2.0 milestone Apr 1, 2021
src/coord/cartesian/Cartesian2D.ts Outdated Show resolved Hide resolved
src/component/helper/BrushTargetManager.ts Outdated Show resolved Hide resolved
@susiwen8 susiwen8 requested a review from pissang April 1, 2021 05:55
@pissang pissang modified the milestones: 5.2.0, 5.1.1 Apr 15, 2021
@pissang pissang modified the milestones: 5.1.1, 5.1.2 Apr 22, 2021
@pissang pissang merged commit 9b21f9b into apache:master Apr 25, 2021
@echarts-bot
Copy link

echarts-bot bot commented Apr 25, 2021

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@pissang
Copy link
Contributor

pissang commented Apr 25, 2021

Found some exists very old bad designs during the review. Going to fix it in a separate PR

For example:
The second parameter View#dataToPoint and Geo#dataToPoint don't follow other coordinate systems, which is clamp. It's easy to pass a wrong value.
https://github.com/apache/echarts/blob/master/src/coord/View.ts#L271

@susiwen8 susiwen8 deleted the 14416 branch April 25, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpect bar count when use zoomSelect
2 participants