|
|
@ -89,13 +89,15 @@ onDOMContentLoaded(() => {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
document.addEventListener('keydown', event => {
|
|
|
|
document.addEventListener('keydown', event => {
|
|
|
|
event.preventDefault()
|
|
|
|
event.preventDefault()
|
|
|
|
if (event.key === 'Escape' && document.fullscreenEnabled) {
|
|
|
|
if (event.key === 'Escape') {
|
|
|
|
const target = event.target as HTMLElement
|
|
|
|
const iconMaximize = document.querySelector<HTMLElement>(SELECTOR_MAXIMIZE_ICON)
|
|
|
|
const fsButton = target.closest(SELECTOR_FULLSCREEN_TOGGLE) as HTMLElement | undefined
|
|
|
|
const iconMinimize = document.querySelector<HTMLElement>(SELECTOR_MINIMIZE_ICON)
|
|
|
|
|
|
|
|
if (iconMaximize) {
|
|
|
|
|
|
|
|
iconMaximize.style.display = 'block'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (fsButton) {
|
|
|
|
if (iconMinimize) {
|
|
|
|
const data = new FullScreen(fsButton)
|
|
|
|
iconMinimize.style.display = 'none'
|
|
|
|
data.toggleFullScreen()
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|