Molkit 0.9.0
Released May 12, 2026
New Features
- Text alignment by font metrics: baseline, cap-height, x-height, and descent are now alignment anchors for text annotations, so dragging "team" near "joy" snaps baselines regardless of descender content
- Text Alignment Mode dropdown next to alignTop/alignBottom/alignMiddle: Box (default), Baseline, or Cap-Height; grayed out when the selection contains non-text items
- Paired distance pills: gap labels now display on both sides of a between-snap; short segments offset-render their label above the segment instead of being suppressed
- Source markers on alignment guides: filled chevrons at each contributing static object and an open circle at the dragged object, replacing the previous low-opacity ticks
- New ⊕ glyph at the static-side endpoint when alignment fires from a typographic anchor or molecule structural centerline, making it visually clear the alignment is not to a bounding-box edge
- Release flash: snapped alignment guides briefly pulse at mouseup so the final resnap correction is visible
Improvements
- Textbox padding for sub/superscript content is now symmetric top and bottom; selection chrome matches the visible background pill
- Distribution chain visualization cap dropped from 5 to 3 with an "x N" badge showing total chain length
- Alignment strength cap now preserves any guide whose delta is below 0.5 pixels regardless of distance from the dragged centroid, so tall objects do not lose their edge guides when a center-class guide also fires
- Molecule structural centerlines now exclude atoms inside projection-rendered structures (Fischer, Newman, Haworth, Chair)
- Multi-item drag now applies the same relative-strength alignment cap that single-item drag already had
- Multi-item centerline weighting uses bond counts within the dragged subset on partial-fragment drags instead of global counts
- Auto-shrink (Shrink to Text) minimum dimensions now scale with fontSize: a 6pt textbox can shrink to about 28x16 instead of being floored at 60x30
Bug Fixes
- Line shapes drawn with the Line tool now align by their visual edges; the bounding box previously over-padded the axial dimension by halfSW, causing cross-pair alignment candidates to win with a phantom near-zero delta
- Multi-item drag now renders a dragged-side marker for every selected item participating in the same alignment guide (was last-write-wins, only the last item's circle rendered)
- Release flash no longer gets erased by a pending preview render frame scheduled before mouseup
- Curved-spline Bezier control-point drag: replaced the broken during-drag plane snap (used a rotating handle direction as the plane normal, snap target was angled) with a mouseup re-symmetrize using autoArcArrow on the chord-perpendicular axis