fix: maintain a 4:3 aspect ratio when packing distant schematic groups - #211
fix: maintain a 4:3 aspect ratio when packing distant schematic groups#211anil08607 wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| if (deltaX >= deltaY) return packedComponents | ||
|
|
||
| const anchorIndex = Number(anchor.componentId.replace("partition_", "")) | ||
| const movingIndex = Number(moving.componentId.replace("partition_", "")) |
seveibar
left a comment
There was a problem hiding this comment.
using strings isn't allowed, i suspect this implementation is more of a hack than a proper aspect ratio aware solution
|
there is already string replacement being used but we shouldn't make the problem worse I don't know what the correct solution for this is, but i think this is more of a hack, i'd need to see evidence of other solutions being trialed and actually a selection process |
mohan-bee
left a comment
There was a problem hiding this comment.
not sure how helpful is this .. becuase this may regress the trace solver to fallback to netlabel instead of routing
|
@anil08607 mohan-bee has a point, whenever you are making contributions to matchpack or schematic-trace-solver you should always bun link it in core and see the snapshot changes are actually improvements or not |
Fixes #14.
The partition packer could stack distantly related schematic groups vertically when they shared only a global rail such as GND. This caused schematics to grow vertically and produce an unbalanced portrait layout.
Changes
4:3layout aspect ratio.repro-tall-growing-schematic.snap.svg.Testing
bun run format:check— passedbunx tsc --noEmit— passedgit diff --check— passed