feat(dees-chart-area): add full page toggle control for chart area

This commit is contained in:
2026-04-03 12:59:10 +00:00
parent 0d7f68086d
commit 10b67adfe1
5 changed files with 70 additions and 2 deletions

View File

@@ -580,6 +580,29 @@ export class DeesChartArea extends DeesElement {
await this.resizeChart();
}
public toggleFullPage() {
this.isFullPage = !this.isFullPage;
if (this.isFullPage) {
this.style.position = 'fixed';
this.style.inset = '0';
this.style.zIndex = '10000';
this.style.height = '100vh';
this.style.padding = '0';
document.body.style.overflow = 'hidden';
} else {
this.style.position = '';
this.style.inset = '';
this.style.zIndex = '';
this.style.height = '';
this.style.padding = '';
document.body.style.overflow = '';
}
// Give LC a tick to resize
requestAnimationFrame(() => {
this.chart?.timeScale().fitContent();
});
}
private startAutoScroll() {
if (this.autoScrollTimer) return;
this.autoScrollTimer = window.setInterval(() => {