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