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

Handle onBrushDomainChangeEnd on drag and pan of brush. #1126

Merged

Conversation

jeloagnasin
Copy link
Contributor

My previous PR didn't account the drag and pan actions. Sorry about that.

@boygirl
Copy link
Contributor

boygirl commented Oct 3, 2018

@jeloagnasin sorry for the delay. This works well for me. Thanks!

@boygirl boygirl merged commit 47910b9 into FormidableLabs:master Oct 3, 2018
@jeloagnasin
Copy link
Contributor Author

jeloagnasin commented Oct 9, 2018

@boygirl, I think I made a huge mistake. But I'm not really sure.

In this code:

    } else if ((allowDrag && isPanning) || (allowResize && isSelecting)) {
      if (isFunction(onBrushDomainChangeEnd)) {
        onBrushDomainChangeEnd(currentDomain, defaults({}, mutatedProps, targetProps));
      }
    }

I'm pretty sure that the onBurshDomainChangeEnd is being called when the user ends dragging or resizing the brush. But what I'm not sure about is if I should pass currentDomain or cachedDomain instead?

I'd be happy to write another PR to fix my mistake. And I'm so sorry that I introduced a bug. :( I'm just hoping that nobody has used it yet.

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