@@ -156,11 +156,11 @@ const getTransformOrigin = ({ rect, position, dimensions, targetCenter }) => {
156156 * Function that takes in numbers and position and gives the final coords.
157157 * @param {Position } position — the position the positioner should be on.
158158 * @param {Object } dimensions — the dimensions of the positioner.
159- * @param {Object } targetRect — the rect of the target.
159+ * @param {Rect } targetRect — the rect of the target.
160160 * @param {Number } targetOffset - offset from the target.
161161 * @param {Object } viewport - the width and height of the viewport.
162- * @param {Object } viewportOffset - offset from the viewport.
163- * @return {Object } - { x: Number, y: Number }
162+ * @param {Number } viewportOffset - offset from the viewport.
163+ * @return {Object } - { rect: Rect, position: Position, transformOrigin: string }
164164 */
165165export default function getFittedPosition ( {
166166 position,
@@ -227,7 +227,7 @@ export default function getFittedPosition({
227227 * Function that takes in numbers and position and gives the final coords.
228228 * @param {Position } position — the position the positioner should be on.
229229 * @param {Object } dimensions — the dimensions of the positioner.
230- * @param {Object } targetRect — the rect of the target.
230+ * @param {Rect } targetRect — the rect of the target.
231231 * @param {Number } targetOffset - offset from the target.
232232 * @param {Object } viewport - the width and height of the viewport.
233233 * @param {Object } viewportOffset - offset from the viewport.
@@ -407,11 +407,11 @@ function getPosition({
407407
408408/**
409409 * Function that takes in numbers and position and gives the final coords.
410- * @param {Object } position - the width and height of the viewport.
410+ * @param {Position } position
411411 * @param {Number } targetOffset - offset from the target.
412412 * @param {Object } dimensions — the dimensions of the positioner.
413- * @param {Object } targetRect — the rect of the target.
414- * @return {Object } - { x: Number, y: Number }
413+ * @param {Rect } targetRect — the rect of the target.
414+ * @return {Rect } - Rect { width, height, left, top, right, bottom }
415415 */
416416function getRect ( { position, targetOffset, dimensions, targetRect } ) {
417417 const leftRect = targetRect . left + targetRect . width / 2 - dimensions . width / 2
0 commit comments