This commit is contained in:
David Brazda
2024-11-15 06:13:54 +01:00
parent b336857832
commit 6393e618ce
3 changed files with 5 additions and 2 deletions

View File

@ -37,6 +37,9 @@ export class Legend {
this.div = document.createElement('div');
this.div.classList.add('legend');
this.div.style.maxWidth = `${(handler.scale.width * 100) - 8}vw`
this.div.style.maxHeight = '300px'; // Set a maximum height
this.div.style.overflowY = 'auto'; // Enable vertical scrolling
this.div.style.overflowX = 'hidden'; // Prevent horizontal scrolling
this.div.style.display = 'none';
this.text = document.createElement('span')