-
Notifications
You must be signed in to change notification settings - Fork 250
Custom size mode #373
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
Custom size mode #373
Conversation
fix: no default components on scene
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.
Why is this option needed?
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.
resolveSizeMode is called while iterating through the list of input params for the customized function. If it returns a value, then we know we need to retrieve the value for one of absolute, relative, or render. If it doesn't return a value, then we use the value from the array as is.
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.
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.
I'm not real satisfied with this... 5 input params is a lot so I am definitely open to other suggestions
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.
|
@jd-carroll I am a bit torn on this. While I think this is really cool and adds flexibility I wonder if custom size mode functionality should be part of the Node or if it should just be a component attached to a Node that manages the size. I think the counter would be that Relative and Render size should then be be components as well. Anyone else have thoughts on this? Need to think on this for a bit. |
|
@jd-carroll either way, thanks for introducing the idea! |
|
After a lot of back and forth on this, I'm against this change. At least at this point in time. I agree with @michaelobriena that this should be a component. In fact, I would even argue that every size mode should be a component and pixel size should be the only core size mode. After all, I don't think this is something we currently want/ need and it introduces unnecessary complexity. @jd-carroll Thanks for the PR though, but I don't think this is something we currently want/ need. @michaelobriena Can we close this? |
First cut of allowing custom size modes.