mirror of
https://github.com/slidevjs/rough-notation.git
synced 2026-01-18 19:31:36 +01:00
feat: support opacity
This commit is contained in:
@@ -225,6 +225,8 @@ export function renderAnnotation(
|
||||
setAttr(path, 'fill', 'none')
|
||||
setAttr(path, 'stroke', config.color || 'currentColor')
|
||||
setAttr(path, 'stroke-width', `${strokeWidth}`)
|
||||
if (config.opacity !== undefined)
|
||||
setAttr(path, 'style', `opacity:${config.opacity}`)
|
||||
if (animate) {
|
||||
const length = path.getTotalLength()
|
||||
lengths.push(length)
|
||||
|
||||
Reference in New Issue
Block a user