You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What problem does this solve or what need does it fill?
It is useful to be able to access the computed values for both grid-template-{rows,columns} (concrete pixel values for the sizes of the rows/columns) and grid-{row,column} (concrete integer values for the start/end row/column positions).
Example use cases include:
Introspectability for devtools
Accessing via javascript
For frameworks building on opt of Taffy that want to be able to run logic based on the grid structure.
What solution would you like?
Getter functions on UI Grid styles, such as the grid_placement styles, should return the computed values, not the values set by the setter/at spawn.
What alternative(s) have you considered?
An Alternative getter function would also work. Perhaps get_recent or get_state
The text was updated successfully, but these errors were encountered:
Add a method to the low-level algorithm implementations that allows them to output the intermediate data structures. Consumers of the low-level API can choose whether to store this data or simply discard it.
Add storage to nodes for this data in the TaffyTree. Probably as a Box<dyn Any> so it doesn't take up too much memory if it's not being used.
Make this a runtime configuration option as to whether the TaffyTree saves this information or not.
Add APIs to get at the data from the TaffyTree.
In a future extension we could then potentially add the ability for the algorithms to take these intermediate data structures back in as a cached input. This could allow for finer-grained incremental computation and/or simply re-using the allocations.
nicoburns
changed the title
UI Grid Placement Styles should hold the calculated values during runtime.
Expose computed grid-template and grid-placement values
Dec 12, 2024
What problem does this solve or what need does it fill?
It is useful to be able to access the computed values for both
grid-template-{rows,columns}
(concrete pixel values for the sizes of the rows/columns) andgrid-{row,column}
(concrete integer values for the start/end row/column positions).Example use cases include:
What solution would you like?
Getter functions on UI Grid styles, such as the grid_placement styles, should return the computed values, not the values set by the setter/at spawn.
What alternative(s) have you considered?
An Alternative getter function would also work. Perhaps
get_recent
orget_state
The text was updated successfully, but these errors were encountered: