mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-13 23:24:40 +00:00
fix: fix analyitics page for @SethBurkart123
This commit is contained in:
@@ -25,10 +25,32 @@
|
||||
return config;
|
||||
},
|
||||
});
|
||||
|
||||
function observeChartResize(node: HTMLElement) {
|
||||
let frame = 0;
|
||||
const notify = () => {
|
||||
cancelAnimationFrame(frame);
|
||||
frame = requestAnimationFrame(() => {
|
||||
window.dispatchEvent(new Event("resize"));
|
||||
});
|
||||
};
|
||||
|
||||
const observer = new ResizeObserver(notify);
|
||||
observer.observe(node);
|
||||
notify();
|
||||
|
||||
return {
|
||||
destroy() {
|
||||
cancelAnimationFrame(frame);
|
||||
observer.disconnect();
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
bind:this={ref}
|
||||
use:observeChartResize
|
||||
data-chart={chartId}
|
||||
data-slot="chart"
|
||||
class="bsplus-chart-host {className}"
|
||||
|
||||
Reference in New Issue
Block a user