fix(se-zoom): fix missing arrow_down.svg icon (#874)

master
Liubomyr Vyhovskyi 2023-01-20 01:24:39 +02:00 committed by GitHub
parent 5682e8c596
commit 230331b36e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -82,7 +82,7 @@ template.innerHTML = `
<div id="arrow-down"></div> <div id="arrow-down"></div>
</div> </div>
<div id="down"> <div id="down">
<img width="16" height="8" src="./images/arrow_down.svg"/> <img width="16" height="8" src="arrow_down.svg"/>
</div> </div>
</div> </div>
<div id="options-container" style="display:none"> <div id="options-container" style="display:none">
@ -121,12 +121,19 @@ class SeZoom extends HTMLElement {
this.clickArea = this._shadowRoot.querySelector('#down') this.clickArea = this._shadowRoot.querySelector('#down')
this.clickArea.addEventListener('click', this.handleClick.bind(this)) this.clickArea.addEventListener('click', this.handleClick.bind(this))
this.imgPath = svgEditor.configObj.curConfig.imgPath
this.downImageElement = this.clickArea.querySelector('img')
this.downImageElement.setAttribute(
'src',
(this.imgPath + '/' + this.downImageElement.getAttribute('src'))
)
// set src for imageElement // set src for imageElement
this.imageElement = this._shadowRoot.querySelector('img') this.imageElement = this._shadowRoot.querySelector('img')
this.imageElement.setAttribute( this.imageElement.setAttribute(
'src', 'src',
(this.imgPath = (this.imgPath + '/' + this.getAttribute('src'))
svgEditor.configObj.curConfig.imgPath + '/' + this.getAttribute('src'))
) )
// hookup events for arrow buttons // hookup events for arrow buttons