callmecavs / callmecavs/bricks.js

Support modifying the sizes array after bricks is instantiated

Open
#43 1 comment 7 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.6k
Forks
191
PR merge metrics
No merged PRs in 30d

Description

In my use case, the sizes array is calculated dynamically based on the state of the parent layout (the layout holding the bricks.js instance.) It's possible for the parent layout to change dynamically, which would require recalculating the sizes array.

The most direct solution would be to supply a new sizes array to an existing bricks.js instance and then repack. Do you think this is worth a PR?

I also considered tearing down the existing bricks.js instance and rebuilding it, but I'm not sure if that's the best way to go because of the overhead, and because tearing it down cleanly doesn't seem straightforward. Would you say that this is the preferred approach? Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.