Display the note SVG in a container div

This commit is contained in:
Jackson Harper 2022-03-23 11:20:32 -07:00
parent 4960daeb30
commit 9275dbb732
2 changed files with 9 additions and 10 deletions

View file

@ -152,17 +152,17 @@ export function makeHighlightNodeAttributes(
if (withNote && lastElement) {
lastElement.classList.add('last_element')
const button = document.createElement('img')
button.className = 'highlight_note_button'
button.src = '/static/icons/highlight-note-icon.svg'
button.alt = 'Add note'
button.setAttribute(highlightNoteIdAttribute, id)
const svg = noteImage()
svg.setAttribute(highlightNoteIdAttribute, id)
lastElement.appendChild(button)
const ctr = document.createElement('div')
ctr.className = 'highlight_note_button'
ctr.appendChild(svg)
ctr.setAttribute(highlightNoteIdAttribute, id)
ctr.setAttribute('width', '14px')
ctr.setAttribute('height', '14px')
// const svg = noteImage()
// svg.setAttribute(highlightNoteIdAttribute, id)
// lastElement.appendChild(svg)
lastElement.appendChild(ctr)
}
return {

View file

@ -32,7 +32,6 @@ export function noteImage(): SVGSVGElement {
svg.setAttribute('width', '14')
svg.setAttribute('height', '14')
svg.setAttribute('fill', 'none')
svg.setAttribute('class', 'highlight_note_button')
const path = document.createElementNS(svgURI, 'path')
path.setAttribute(