$click to allow (more) responsiveness
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/* globals svgEditor */
|
||||
import editorPreferencesDialog from './editorPreferencesDialog.html'
|
||||
const template = document.createElement('template')
|
||||
template.innerHTML = editorPreferencesDialog
|
||||
@@ -374,13 +375,13 @@ export class SeEditPrefsDialog extends HTMLElement {
|
||||
const blocks = this.$bgBlocks.querySelectorAll('div')
|
||||
const curBg = 'cur_background'
|
||||
blocks.forEach(function (blk) {
|
||||
blk.addEventListener('click', function () {
|
||||
svgEditor.$click(blk, function () {
|
||||
blocks.forEach((el) => el.classList.remove(curBg))
|
||||
blk.classList.add(curBg)
|
||||
})
|
||||
})
|
||||
this.$saveBtn.addEventListener('click', onSaveHandler)
|
||||
this.$cancelBtn.addEventListener('click', onCancelHandler)
|
||||
svgEditor.$click(this.$saveBtn, onSaveHandler)
|
||||
svgEditor.$click(this.$cancelBtn, onCancelHandler)
|
||||
this.$dialog.addEventListener('close', onCancelHandler)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user