You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
271 B

2 months ago
  1. // @flow
  2. import type { Rect, ClientRectObject } from '../types';
  3. export default function rectToClientRect(rect: Rect): ClientRectObject {
  4. return {
  5. ...rect,
  6. left: rect.x,
  7. top: rect.y,
  8. right: rect.x + rect.width,
  9. bottom: rect.y + rect.height,
  10. };
  11. }