Fixed issue in EditorStartup.init() where $qq will not work if the editor is in a Web Component (#1028)
* Added alt tags to img elements. * fixed lint issues * Changed the SESpinInput to have a closed shadow DOM to fix the duplicate label id issue reported in browser. * Fixed code in EditorStartup that fails if the editor is in a Web Component. $qq will not find the .svg_editor, but this.$container will. * fix linter issue * update packages * remove closed as this causes the test to fail. --------- Co-authored-by: JFH <20402845+jfhenon@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
25e0d91add
commit
61e8d439c4
@@ -39,7 +39,7 @@ const readySignal = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const { $id, $qq, $click, convertUnit } = SvgCanvas
|
||||
const { $id, $click, convertUnit } = SvgCanvas
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -73,7 +73,7 @@ class EditorStartup {
|
||||
const template = document.createElement('template')
|
||||
template.innerHTML = editorTemplate
|
||||
this.$container.append(template.content.cloneNode(true))
|
||||
this.$svgEditor = $qq('.svg_editor')
|
||||
this.$svgEditor = this.$container.querySelector('.svg_editor')
|
||||
// allow to prepare the dom without display
|
||||
this.$svgEditor.style.visibility = 'hidden'
|
||||
this.workarea = $id('workarea')
|
||||
|
||||
@@ -66,7 +66,7 @@ export class SESpinInput extends HTMLElement {
|
||||
// locate the component
|
||||
this.$div = this._shadowRoot.querySelector('div')
|
||||
this.$img = this._shadowRoot.querySelector('img')
|
||||
this.$label = this.shadowRoot.getElementById('label')
|
||||
this.$label = this._shadowRoot.getElementById('label')
|
||||
this.$event = new CustomEvent('change')
|
||||
this.$input = this._shadowRoot.querySelector('elix-number-spin-box')
|
||||
this.imgPath = svgEditor.configObj.curConfig.imgPath
|
||||
|
||||
Reference in New Issue
Block a user