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

428 dynamic bounds margin #467

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

428 dynamic bounds margin #467

wants to merge 3 commits into from

Conversation

Drulokia
Copy link
Collaborator

Added option to set boundsmargin on node level.
Also able to change it after creation.

@Drulokia Drulokia linked an issue Dec 10, 2024 that may be closed by this pull request
Copy link
Collaborator

@jfboeve jfboeve left a comment

Choose a reason for hiding this comment

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

Hey I went through the code the initial work looks good, however I've found some points I would like to see added / changed:

For the Stage.ts:

  • Set the default boundsMargin of the stage when creating the rootNode.
  • Add getter/setter for boundsMargin on Stage and have it also adjust the boundsMargin of the rootNode.

For the CoreNode:

  • for get boundsMargin I don't think we need to check if the boundsMargin in the props is an Array or not, just check if this.props.boundsMargin is not null and return that value. If it is null let it check the parent node(s) with the changes to Stage we won't need the stage.boundsMargin
  • In case the boundsMargin for a CoreNode is set upon creating the node we should call the boundsMargin setter like we are doing with the shaders/texture (line: 761)

Copy link
Contributor

@wouterlucas wouterlucas left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Dynamic bounds margin
3 participants