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 inconsistent behavior with BrushContainer + minor bug #1091

Merged
merged 1 commit into from
Aug 16, 2018

Conversation

bees
Copy link
Contributor

@bees bees commented Aug 15, 2018

The inconsistent behavior is a discrepancy in how the brush container handles redrawing the brush depending on the value of the allowResize prop if defaultArea is set to 'disable'

Here's a quick demo: https://codesandbox.io/s/4jvl663pkw

This PR makes two changes, both small:

  • fix a bug in a conditional check. I caught this by dumb luck, this bug is only surfaced if you defined brushDimension="x" and allowResize="false" on the brush container.
  • added a check if the defaultBrushArea is defined and has area, for consistency with the behavior described in the documentation

I didn't add unit tests since there didn't seem to be any around the events for the brush helper. I feel bad submitting a PR without unit tests - I'm happy to add some if y'all have guidance on a preferred approach to testing this.

@boygirl
Copy link
Contributor

boygirl commented Aug 16, 2018

@bees thank you for this change! Works well and our visual regression tests are all passing! Merging. You can expect this work to be released by Monday

@boygirl boygirl merged commit 34cac80 into FormidableLabs:master Aug 16, 2018
@boygirl boygirl mentioned this pull request Aug 24, 2018
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