bluefishjs / bluefish-archive

A SolidJS diagramming framework
https://bluefishjs.org
MIT License
75 stars 4 forks source link

feat: Stronger BBox Inference #44

Closed joshpoll closed 10 months ago

joshpoll commented 11 months ago

This PR adds the ability to e.g. set left and right and infer width. Previously, right was always inferred, but now it can be set directly and its result will be propagated to the other dimensions.

The approach is roughly to bake in a linear programming solver for this special case of bbox equations. The current approach is not optimized and the set of inference rules that implement the bbox equations is not complete. But I think we should ship it in its current state and fix later as bugs arise in real examples.

This PR enables the Peritext example, where spans are driven by their left and right extents.