Files
MoonPro.net/MP-ADM/Scripts/src/utils/getClientRect.js
T
Samuele E. Locatelli 91ccb018af Code cleanup con CodeMaid
2020-09-11 12:45:52 +02:00

14 lines
378 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,
};
}