return {
element: withinElement,
isWindow: isWindow,
- offset: withinElement.offset(),
+ offset: withinElement.offset() || { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
width: isWindow ? withinElement.width() : withinElement.outerWidth(),
}
var within = data.within,
- withinOffset = ( within.isWindow ? 0 : within.offset.left ) + within.scrollLeft,
+ withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? 0 : within.offset.left,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
}
var within = data.within,
- withinOffset = ( within.isWindow ? 0 : within.offset.top ) + within.scrollTop,
+ withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
offsetTop = within.isWindow ? 0 : within.offset.top,
collisionPosTop = position.top - data.collisionPosition.marginTop,