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

Zoom behavior: clip scale to scaleExtent #2128

Closed
wants to merge 1 commit into from

Conversation

mgold
Copy link
Contributor

@mgold mgold commented Nov 25, 2014

Currently, it is possible to manually set a scale value outside a zoom behavior's scaleExtent.

var zoom = d3.behavior.zoom();
zoom.scaleExtent();
 > [0, Infinity]
zoom.scale(-1);
zoom.scale();
> -1
zoom.scaleExtent();
> [0, Infinity]

This seems broken to me. If you disagree, fine, close the PR. There's already a clipping function scaleTo so we just call that.

@mbostock mbostock added the bug Something isn’t working label Oct 21, 2015
@mbostock mbostock modified the milestones: 3.5.x, 3.5.7 Oct 21, 2015
@mbostock
Copy link
Member

mbostock commented Nov 2, 2015

Merged into #2591 for 3.5.7.

@mbostock mbostock closed this Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants