Make highlight opacity and blend mode configurable

This commit is contained in:
John Factotum
2023-10-13 17:42:04 +08:00
parent d44e8d6d64
commit 28873972ef
+2 -1
View File
@@ -127,7 +127,8 @@ export class Overlayer {
const { color = 'red' } = options
const g = createSVGElement('g')
g.setAttribute('fill', color)
g.setAttribute('fill-opacity', .3)
g.style.opacity = `var(--overlayer-highlight-opacity, .3)`
g.style.mixBlendMode = `var(--overlayer-highlight-blend-mode, normal)`
for (const { left, top, height, width } of rects) {
const el = createSVGElement('rect')
el.setAttribute('x', left)