Files
SSC/CMS_SC/Scripts/src/utils/getClientRect.js
T
2019-11-29 18:06:23 +01:00

15 lines
363 B
JavaScript

/**
* 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,
};
}