website_next: part 3

This commit is contained in:
nym21
2026-07-06 11:15:39 +02:00
parent eee1a10d2a
commit 3f9edb211e
103 changed files with 1829 additions and 2040 deletions
+6 -3
View File
@@ -145,9 +145,13 @@ export function createXyChart({
highlight.clearPreview();
}
function disconnect() {
function cancelPointerFrame() {
if (pointerFrame) cancelAnimationFrame(pointerFrame);
pointerFrame = 0;
}
function disconnect() {
cancelPointerFrame();
resizeObserver.disconnect();
}
@@ -157,8 +161,7 @@ export function createXyChart({
svg.addEventListener("pointerenter", measure);
svg.addEventListener("pointermove", updateFromPointer);
svg.addEventListener("pointerleave", () => {
if (pointerFrame) cancelAnimationFrame(pointerFrame);
pointerFrame = 0;
cancelPointerFrame();
hideMarker();
});
figure.addEventListener("chart:destroy", disconnect, { once: true });