amis-rpc-design/node_modules/rc-image/lib/getFixScaleEleTransPosition.d.ts

17 lines
484 B
TypeScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/**
* Fix positon x,y point when
*
* Ele width && height < client
* - Back origin
*
* - Ele width | height > clientWidth | clientHeight
* - left | top > 0 -> Back 0
* - left | top + width | height < clientWidth | clientHeight -> Back left | top + width | height === clientWidth | clientHeight
*
* Regardless of other
*/
export default function getFixScaleEleTransPosition(width: number, height: number, left: number, top: number): null | {
x: number;
y: number;
};