📚 Documentação inicial do ALETHEIA
- MANUAL-PRODUTO.md: Manual do usuário final - MANUAL-VENDAS.md: Estratégia comercial e vendas - MANUAL-TECNICO.md: Infraestrutura e deploy - README.md: Visão geral do projeto
This commit is contained in:
33
frontend/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs
generated
vendored
Normal file
33
frontend/node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* Bounding boxes tend to be defined as top, left, right, bottom. For various operations
|
||||
* it's easier to consider each axis individually. This function returns a bounding box
|
||||
* as a map of single-axis min/max values.
|
||||
*/
|
||||
function convertBoundingBoxToBox({ top, left, right, bottom, }) {
|
||||
return {
|
||||
x: { min: left, max: right },
|
||||
y: { min: top, max: bottom },
|
||||
};
|
||||
}
|
||||
function convertBoxToBoundingBox({ x, y }) {
|
||||
return { top: y.min, right: x.max, bottom: y.max, left: x.min };
|
||||
}
|
||||
/**
|
||||
* Applies a TransformPoint function to a bounding box. TransformPoint is usually a function
|
||||
* provided by Framer to allow measured points to be corrected for device scaling. This is used
|
||||
* when measuring DOM elements and DOM event points.
|
||||
*/
|
||||
function transformBoxPoints(point, transformPoint) {
|
||||
if (!transformPoint)
|
||||
return point;
|
||||
const topLeft = transformPoint({ x: point.left, y: point.top });
|
||||
const bottomRight = transformPoint({ x: point.right, y: point.bottom });
|
||||
return {
|
||||
top: topLeft.y,
|
||||
left: topLeft.x,
|
||||
bottom: bottomRight.y,
|
||||
right: bottomRight.x,
|
||||
};
|
||||
}
|
||||
|
||||
export { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };
|
||||
Reference in New Issue
Block a user