Changeset 28780 for trunk/themes/default/js/ui/jquery.ui.position.js
- Timestamp:
- Jun 24, 2014, 10:16:59 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/themes/default/js/ui/jquery.ui.position.js
r20824 r28780 1 1 /*! 2 * jQuery UI Position 1.10. 12 * jQuery UI Position 1.10.4 3 3 * http://jqueryui.com 4 4 * 5 * Copyright 201 3jQuery Foundation and other contributors5 * Copyright 2014 jQuery Foundation and other contributors 6 6 * Released under the MIT license. 7 7 * http://jquery.org/license … … 71 71 } 72 72 var w1, w2, 73 div = $( "<div style='display:block; width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),73 div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), 74 74 innerDiv = div.children()[0]; 75 75 … … 89 89 }, 90 90 getScrollInfo: function( within ) { 91 var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ), 92 overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ), 91 var overflowX = within.isWindow || within.isDocument ? "" : 92 within.element.css( "overflow-x" ), 93 overflowY = within.isWindow || within.isDocument ? "" : 94 within.element.css( "overflow-y" ), 93 95 hasOverflowX = overflowX === "scroll" || 94 96 ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), … … 96 98 ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); 97 99 return { 98 width: hasOverflow X? $.position.scrollbarWidth() : 0,99 height: hasOverflow Y? $.position.scrollbarWidth() : 0100 width: hasOverflowY ? $.position.scrollbarWidth() : 0, 101 height: hasOverflowX ? $.position.scrollbarWidth() : 0 100 102 }; 101 103 }, 102 104 getWithinInfo: function( element ) { 103 105 var withinElement = $( element || window ), 104 isWindow = $.isWindow( withinElement[0] ); 106 isWindow = $.isWindow( withinElement[0] ), 107 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; 105 108 return { 106 109 element: withinElement, 107 110 isWindow: isWindow, 111 isDocument: isDocument, 108 112 offset: withinElement.offset() || { left: 0, top: 0 }, 109 113 scrollLeft: withinElement.scrollLeft(), … … 437 441 } 438 442 else if ( overBottom > 0 ) { 439 newOverTop = position.top - 443 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; 440 444 if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) { 441 445 position.top += myOffset + atOffset + offset;
Note: See TracChangeset
for help on using the changeset viewer.