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

Regions plugin: Only add resize handles if resize prop is true #3171

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Regions plugin: Only add resize handles if resize prop is true #3171

merged 1 commit into from
Sep 11, 2023

Conversation

yyao84
Copy link
Contributor

@yyao84 yyao84 commented Sep 8, 2023

Short description

Currently, adding a new region also creates left and right resize handles regardless of the resize param being set. For small regions, the resize handles makes it so you can't see the actual background color.

Implementation details

Add the resize param to the resize handle creation conditional.

How to test it

regionsPlugin.addRegion({
...,
resize: false
});

Added an e2e test as well

Screenshots

Before: Before
After: After

Checklist

  • [✅] This PR is covered by e2e tests
  • [✅] It introduces no breaking API changes

Copy link
Owner

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

Thanks!

@katspaugh katspaugh merged commit e796e5a into katspaugh:main Sep 11, 2023
@larsrgit
Copy link

The current implementation only checks during creation of the region. The resize handles should be added when the resize prop is set to true with changeOptions

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.

3 participants