@lottiefiles/dotlottie-web
Advanced tools
Comparing version 0.35.0 to 0.36.0
@@ -263,2 +263,26 @@ interface Marker { | ||
setStateMachineStringContext(name: string, value: string): boolean; | ||
/** | ||
* Get the bounds of a layer by its name | ||
* @param layerName - The name of the layer | ||
* @returns The bounds of the layer | ||
* | ||
* @example | ||
* ```typescript | ||
* // Draw a rectangle around the layer 'Layer 1' | ||
* dotLottie.addEventListener('render', () => { | ||
* const boundingBox = dotLottie.getLayerBoundingBox('Layer 1'); | ||
* | ||
* if (boundingBox) { | ||
* const { x, y, width, height } = boundingBox; | ||
* context.strokeRect(x, y, width, height); | ||
* } | ||
* }); | ||
* ``` | ||
*/ | ||
getLayerBoundingBox(layerName: string): { | ||
height: number; | ||
width: number; | ||
x: number; | ||
y: number; | ||
} | undefined; | ||
} | ||
@@ -265,0 +289,0 @@ |
{ | ||
"name": "@lottiefiles/dotlottie-web", | ||
"version": "0.35.0", | ||
"version": "0.36.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Lottie and DotLottie player for the web", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
5256869
3758