mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
fix: dialog class should have "window" class to get propert buttons
This commit is contained in:
parent
418cd06bb0
commit
b747b347f4
1 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,8 @@ import { translate } from '../i18n.js'
|
|||
export default class Dialog {
|
||||
constructor(parent) {
|
||||
this.parent = parent
|
||||
this.container = DomUtil.create('dialog', 'umap-dialog window', this.parent)
|
||||
this.className = 'umap-dialog window'
|
||||
this.container = DomUtil.create('dialog', this.className, this.parent)
|
||||
DomEvent.disableClickPropagation(this.container)
|
||||
DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu.
|
||||
DomEvent.on(this.container, 'wheel', DomEvent.stopPropagation)
|
||||
|
@ -35,7 +36,7 @@ export default class Dialog {
|
|||
else this.container.show()
|
||||
if (className) {
|
||||
// Reset
|
||||
this.container.className = 'umap-dialog'
|
||||
this.container.className = this.className
|
||||
this.container.classList.add(...className.split(' '))
|
||||
}
|
||||
const buttonsContainer = DomUtil.create('ul', 'buttons', this.container)
|
||||
|
|
Loading…
Reference in a new issue