diff --git a/src/rough-notation.ts b/src/rough-notation.ts index 3d5dea2..dda8848 100644 --- a/src/rough-notation.ts +++ b/src/rough-notation.ts @@ -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 } diff --git a/src/types.ts b/src/types.ts index 1c72698..a19846c 100644 --- a/src/types.ts +++ b/src/types.ts @@ -26,6 +26,7 @@ export interface RoughAnnotationConfigBase extends Partial { 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 */