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

Feature request: add ability to update container dimensions on the fly when using getLayout #141

Open
maikthomas opened this issue Sep 5, 2024 · 0 comments

Comments

@maikthomas
Copy link
Contributor

Currently to update containerDimensions you must call initLayoutContainer again with all the options including the updated dimensions.

It would be good to able to call getLayout including the updated dimensions.

I'm happy to open a PR for this, what API do you think could work?
Some ideas:

// Update getLayout with 2nd optional argument 'options'
const { boxes } = layout.getLayout(elementArray, options);
// options could really be the whole options object, allowing us to update any options on the fly, this could also be good for updating the ratios on the fly, I'm thinking mobile orientation change, to prefer landscapey videos to portaitey

// Just allow dimensions
const { boxes } = layout.getLayout(elementArray, dimensions);

// separate method to update options
layout.updateOptions(options);
const { boxes } = layout.getLayout(elementArray);
aullman added a commit that referenced this issue Sep 30, 2024
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

No branches or pull requests

1 participant