aboutsummaryrefslogtreecommitdiffstats
path: root/npm_assets/node_modules/popper.js/src/utils/getClientRect.js
blob: 4f659d3ee37c436beb562d3d658e04f7fb090613 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * Given element offsets, generate an output similar to getBoundingClientRect
 * @method
 * @memberof Popper.Utils
 * @argument {Object} offsets
 * @returns {Object} ClientRect like output
 */
export default function getClientRect(offsets) {
  return {
    ...offsets,
    right: offsets.left + offsets.width,
    bottom: offsets.top + offsets.height,
  };
}