Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Zoom and Brush container fixes #475

Merged
merged 3 commits into from
Jun 1, 2017
Merged

Zoom and Brush container fixes #475

merged 3 commits into from
Jun 1, 2017

Conversation

chrisbolin
Copy link
Contributor

  • Fix for 0.19.0 breaks brushing victory#607 - brush container would stop selecting if you moved the mouse quickly (or even a little bit faster than a crawl). This was an event bubbling issue: onMouseLeave was firing for child elements. The fix ensure that the parent svg was left (not, e.g., the selected domain rect).
  • Fix for VictoryGraph with VictoryZoomContainer reverts to old values if updated after zoom victory#597 - (although it does not close the issue, as there is another bug). Zoom container didn't respect outside zoomDomain changes; it would revert back to internally cached values once zoom interactions (zoom/pan) resumed. The fix ensures that internal values are updated when outside changes happen.
  • Updates to demos: fix a bug in the zoom/brush demo (which made it hard to find the actual zoom container issue), add a debugging demo, showcase diff zoom dimensions.

const originalDomain = this.getDomain(targetProps);
const currentDomain = defaults(
{}, targetProps.currentDomain || zoomDomain || originalDomain, domain
);
const { x, y } = Selection.getSVGEventCoordinates(evt);
return [{
target: "parent",
mutation: () => {
return {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no reason why onMouseDown needs to squash values for the various *domain props. this makes the this.getLastDomain fix work.

@@ -0,0 +1,66 @@
/*eslint-disable no-magic-numbers */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A demo to work through bug reproductions. Intensionally not shown on the demo table of contents

@boygirl
Copy link
Contributor

boygirl commented Jun 1, 2017

@chrisbolin this looks good to me.

@chrisbolin chrisbolin merged commit a604159 into master Jun 1, 2017
@chrisbolin chrisbolin deleted the zoom-and-brush-fixes branch June 1, 2017 20:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants