-
Notifications
You must be signed in to change notification settings - Fork 12
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: helpers for full axis, locked dimension, dimension can be added to axis #253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally I'm not sure if I agree with adding these three new methods to rulesHelper
.
Internally they are sound, but should they really live here? isDimensionLocked
is only an extension of isDimensionLocked
, isAxisFull
extends getAxisMaxNumberOfDimsByVisType
and canDimensionBeAddedToAxis
extends the other two. Even though these methods highly depend on the rules, what they're doing for rulesHelper
though is just adding layout logic to the rules engine. Is this our preferred pattern? 🤔 @janhenrikoverland
Plus one which returns if a dimension can be added to a specific axis based on the layout rules and the current content of the axis.
Added a new one which returns a transferable dimension from a specific axis.
06efc61
to
cfeecbe
Compare
## [2.8.5](v2.8.4...v2.8.5) (2020-01-24) ### Bug Fixes * helpers for full axis, locked dimension, dimension can be added to axis ([#253](#253)) ([2d6b68f](2d6b68f))
🎉 This PR is included in version 2.8.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
These are used when a dimension is added/moved/dragged in the layout.
It respects the layout rules by checking the current state of the destination axis (is full, the dimension already present is locked...) to avoid incorrectly adding a dimension.