/** * @file 坐标工具函数 */ /** * Fix position 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): { x: number; y: number; } | { [x: string]: number; x?: undefined; y?: undefined; } | null;