feat(dees-chart-area): add full page toggle control for chart area
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user