chore: prettier
This commit is contained in:
parent
0c9c79195a
commit
109545d006
1 changed files with 2 additions and 6 deletions
|
@ -4,11 +4,7 @@ import { translate } from '../i18n.js'
|
||||||
export default class Dialog {
|
export default class Dialog {
|
||||||
constructor(parent) {
|
constructor(parent) {
|
||||||
this.parent = parent
|
this.parent = parent
|
||||||
this.container = DomUtil.create(
|
this.container = DomUtil.create('dialog', 'umap-dialog', this.parent)
|
||||||
'dialog',
|
|
||||||
'umap-dialog',
|
|
||||||
this.parent
|
|
||||||
)
|
|
||||||
DomEvent.disableClickPropagation(this.container)
|
DomEvent.disableClickPropagation(this.container)
|
||||||
DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu.
|
DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu.
|
||||||
DomEvent.on(this.container, 'wheel', DomEvent.stopPropagation)
|
DomEvent.on(this.container, 'wheel', DomEvent.stopPropagation)
|
||||||
|
@ -23,7 +19,7 @@ export default class Dialog {
|
||||||
this.container.close()
|
this.container.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
open({className, content, modal} = {}) {
|
open({ className, content, modal } = {}) {
|
||||||
this.container.innerHTML = ''
|
this.container.innerHTML = ''
|
||||||
if (modal) this.container.showModal()
|
if (modal) this.container.showModal()
|
||||||
else this.container.show()
|
else this.container.show()
|
||||||
|
|
Loading…
Reference in a new issue