@aplus-frontend/antdv
Version:
Vue basic component library maintained based on ant-design-vue
17 lines (16 loc) • 484 B
TypeScript
/**
* 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;
};