mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Cleanup spacing in offset.js. Fixes #10601
This commit is contained in:
parent
0804cdfe9a
commit
33e98834fe
@ -154,7 +154,7 @@ jQuery.extend( jQuery.offset, {
|
||||
curOffset = curElem.offset(),
|
||||
curCSSTop = jQuery.css( elem, "top" ),
|
||||
curCSSLeft = jQuery.css( elem, "left" ),
|
||||
calculatePosition = (position === "absolute" || position === "fixed") && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
|
||||
calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
|
||||
props = {}, curPosition = {}, curTop, curLeft;
|
||||
|
||||
// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
|
||||
@ -171,11 +171,11 @@ jQuery.extend( jQuery.offset, {
|
||||
options = options.call( elem, i, curOffset );
|
||||
}
|
||||
|
||||
if (options.top != null) {
|
||||
props.top = (options.top - curOffset.top) + curTop;
|
||||
if ( options.top != null ) {
|
||||
props.top = ( options.top - curOffset.top ) + curTop;
|
||||
}
|
||||
if (options.left != null) {
|
||||
props.left = (options.left - curOffset.left) + curLeft;
|
||||
if ( options.left != null ) {
|
||||
props.left = ( options.left - curOffset.left ) + curLeft;
|
||||
}
|
||||
|
||||
if ( "using" in options ) {
|
||||
|
Loading…
Reference in New Issue
Block a user