Molkit 0.6.0
Released May 2, 2026
New Features
- Dual-DOF drag for arrow tips: drag the white square at an endpoint to slide the contact along a bond or edge AND adjust the perpendicular gap in one gesture, with a live cursor readout showing position and gap
- Anchor section in Properties panel with position slider (0-100%) for arrow attachments; double-click resets to 50%
- Right-click "Reset Tip to Bond Midpoint" menu entry on bond-anchored arrow endpoints
- Anchor badge: a dot inside the white-square handle indicates an anchored endpoint
- Anchor ring during drag: shows where the anchor currently sits on the target
- Atom-edge and annotation-edge attached arrows can now slide along the chosen edge (was fixed at midpoint)
Improvements
- Modifier convention standardized for arrow-tip drag: Alt for no snap, Shift for gap-only lock, Ctrl for re-anchor
- Drag thresholds scale with edge length so short label edges (e.g. "O", "OH") remain slidable instead of fully covered by snap zones
- Alt now disables both midpoint snap and end-engage so you can land on exact intermediate positions like 97% without the last 2% snapping to 100%
- Rotated textbox arrow attachments follow the rotated edge in both canvas rendering and animation export
- Animation preview and exported SVG respect user-set per-attachment gaps (was defaulting to 3px regardless)
- Atom-edge and annotation-edge attached arrows no longer get extra unwanted tangent pullback in animation
- Approach-angle handle replaced by Bezier handle's Shift+drag (cleaner rotation gesture with absolute angle snap)
- Coplanar lock for spline Bezier handles moved from Shift to Alt+Shift to free Shift for angle snap
Bug Fixes
- LP/radical drag no longer uses world origin as anchor (was producing nonsense gap values); now resolves actual dot position
- Atom-edge drag on implicit-C atoms no longer silently fails
- Curved-spline arrow head flip from stored coordinate drift fixed via reducer self-heal and late-bind label-clearance contact
- 11 silent-data-loss and high-impact bugs surfaced by arrow audit (dead cursor styles, phantom undo entries, mid-drag undo guard, snap-flicker hysteresis, etc.)
- 5 low-priority arrow fixes (file-load attachment scrub, gap chord clamp, etc.)
- 3 medium-scope arrow fixes including angle-guide active-spoke renderer enhancement
- Bond-attached arrow rework with reducer self-heal of stored x/y drift
Performance
- Spatial-grid cache for select-tool merge probes and radical alignment (eliminates linear scans)
- _withBondContext fast path at 16 stable call sites avoids redundant Store atom/bond swaps during animation rendering
- _buildBondCtx helper with cached context slots reduces per-frame work
- Cached --bond-color CSS variable lookup, drop per-bond getComputedStyle calls
- Cached grp.endStateEl, drop 16 per-frame querySelector calls
- rAF-throttled chat-widget streaming markdown render