Fixt highlight order on creation.

This commit is contained in:
Severin Opel 2020-09-01 13:38:22 +02:00
parent 116058ba77
commit 28cfdc180c

View File

@ -322,12 +322,11 @@ export default class Highlight extends Object {
maskImage.setAttribute('width', width)
maskImage.setAttribute('height', height)
maskImage.setAttribute('class', 'addedImage')
svgGroup.insertBefore(maskImage, element) // image.nextSibling)
TweenLite.set(maskImage, { scale: 1 })
maskImage.style.mask = 'url(#' + maskId + ')'
}
svgGroup.appendChild(maskImage)
element.insertAdjacentElement('beforebegin', maskImage) // image.nextSibling)
// svgGroup.appendChild(element)
return [mask, maskImage]