mirror of
https://github.com/spartan-ng/spartan.git
synced 2026-09-22 16:41:38 +08:00
6c69b40782
- Replace `take(1)` with a full subscription stored in `_positionChangeSub` so viewport resizes while the tooltip is open correctly update arrow direction. The subscription is cleaned up in `_hide()`. - Remove the `resolved !== this.position()` guard so that returning to the preferred side after a flip correctly resets the arrow. - Change `resolveTooltipPosition` to return `null` instead of silently defaulting to `'top'`, so the caller skips the update on unknown positions rather than rendering a potentially wrong arrow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@spartan-ng/brain/tooltip
Secondary entry point of @spartan-ng/brain. It can be used by importing from @spartan-ng/brain/tooltip.