UNPKG

484 BTypeScriptView Raw
1/**
2 * Fix positon x,y point when
3 *
4 * Ele width && height < client
5 * - Back origin
6 *
7 * - Ele width | height > clientWidth | clientHeight
8 * - left | top > 0 -> Back 0
9 * - left | top + width | height < clientWidth | clientHeight -> Back left | top + width | height === clientWidth | clientHeight
10 *
11 * Regardless of other
12 */
13export default function getFixScaleEleTransPosition(width: number, height: number, left: number, top: number): null | {
14 x: number;
15 y: number;
16};