Add zoom setting

This commit is contained in:
Geomitron
2024-07-11 17:08:36 -05:00
parent 1f7184dcc3
commit 2d9fad5d03
6 changed files with 80 additions and 39 deletions

View File

@@ -14,5 +14,16 @@ export class AppComponent {
constructor(settingsService: SettingsService) {
// Ensure settings are loaded before rendering the application
settingsService.loadSettings().then(() => this.settingsLoaded = true)
document.addEventListener('keydown', event => {
if (event.ctrlKey && (event.key === '+' || event.key === '-' || event.key === '=')) {
event.preventDefault()
if (event.key === '+' || event.key === '=') {
settingsService.zoomIn()
} else {
settingsService.zoomOut()
}
}
})
}
}