getPositionOnMoveOrScale.d.ts 464 B

12345678910111213141516171819
  1. /**
  2. * 获取移动或缩放之后的中心点
  3. */
  4. export default function getPositionOnMoveOrScale({ x, y, clientX, clientY, offsetX, offsetY, fromScale, toScale, }: {
  5. x: number;
  6. y: number;
  7. clientX: number;
  8. clientY: number;
  9. offsetX?: number;
  10. offsetY?: number;
  11. fromScale: number;
  12. toScale: number;
  13. }): {
  14. x: number;
  15. y: number;
  16. scale: number;
  17. lastMoveClientX: number;
  18. lastMoveClientY: number;
  19. };