param = (direction === 'top') ? 'height' : 'width',
offset = (param === 'height') ? this.options.vOffset : this.options.hOffset;
-
-
- if(($eleDims.width >= $eleDims.windowDims.width) || (!this.counter && !Foundation.Box.ImNotTouchingYou(this.$element))){
+ if(($eleDims.width >= $eleDims.windowDims.width) || (!this.counter && !Foundation.Box.ImNotTouchingYou(this.$element, this.$parent))){
- var newWidth = $eleDims.windowDims.width,
- newHOffset = 0;
- if(this.$parent) {
- var $parentDims = Foundation.Box.GetDimensions(this.$parent);
- newHOffset = $parentDims.offset.left;
- if($parentDims.width < newWidth){
- newWidth = $parentDims.width;
- }
- }
- this.$element.offset(Foundation.Box.GetOffsets(this.$element, this.$anchor, 'center bottom', this.options.vOffset, this.options.hOffset + newHOffset, true)).css({
- 'width': newWidth - (this.options.hOffset * 2),
+ this.$element.offset(Foundation.Box.GetOffsets(this.$element, this.$anchor, 'center bottom', this.options.vOffset, this.options.hOffset, true)).css({
+ 'width': $eleDims.windowDims.width - (this.options.hOffset * 2),
'height': 'auto'
});
this.classChanged = true;
this.$element.offset(Foundation.Box.GetOffsets(this.$element, this.$anchor, position, this.options.vOffset, this.options.hOffset));
- while(!Foundation.Box.ImNotTouchingYou(this.$element, this.$parent) && this.counter){
- while(!Foundation.Box.ImNotTouchingYou(this.$element, false, true) && this.counter){
++ while(!Foundation.Box.ImNotTouchingYou(this.$element, this.$parent, true) && this.counter){
this._reposition(position);
this._setPosition();
}