mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Display the note SVG in a container div
This commit is contained in:
parent
4960daeb30
commit
9275dbb732
2 changed files with 9 additions and 10 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue