mirror of
https://github.com/slidevjs/rough-notation.git
synced 2026-01-14 17:44:21 +01:00
feat: add delay option
This commit is contained in:
@@ -229,7 +229,7 @@ class RoughAnnotationImpl implements RoughAnnotation {
|
||||
const rect = rects[i]
|
||||
const ad = totalDuration * (rect.w / totalWidth)
|
||||
promises.push(
|
||||
renderAnnotation(svg, rects[i], config, delay + this._animationDelay, ad, this._seed),
|
||||
renderAnnotation(svg, rects[i], config, delay + this._animationDelay + (this._config.delay || 0), ad, this._seed),
|
||||
)
|
||||
delay += ad
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ export interface RoughAnnotationConfigBase extends Partial<ResolvedOptions> {
|
||||
padding?: RoughPadding // defaults to 5px
|
||||
iterations?: number // defaults to 2
|
||||
brackets?: BracketType | BracketType[] // defaults to 'right'
|
||||
delay?: number // defaults to 0
|
||||
/**
|
||||
* Additional class to add to the root SVG element
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user