mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
Make highlight opacity and blend mode configurable
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user