Update LayersPanel.js (#981)

* Update LayersPanel.js

fix the eye icon lost at right layers

* Update LayersPanel.js

---------

Co-authored-by: JFH <20402845+jfhenon@users.noreply.github.com>
This commit is contained in:
w8w8w8
2024-07-05 06:10:05 +08:00
committed by GitHub
parent 5a3f24ef72
commit e81a4f8ba9

View File

@@ -256,6 +256,14 @@ class LayersPanel {
layerTr.className = (name === currentLayerName) ? 'layer layersel' : 'layer'
const layerVis = document.createElement('td')
layerVis.className = (!drawing.getLayerVisibility(name)) ? 'layerinvis layervis' : 'layervis'
// fix the eye icon lost at right layers
const _eye = document.createElement('img')
_eye.src = './images/eye.svg'
_eye.style.width = '14px'
_eye.style.width = '14px'
layerVis.appendChild(_eye)
const layerName = document.createElement('td')
layerName.className = 'layername'
layerName.textContent = name