r2074 - trunk/ui
r2074 - trunk/ui
Author: paul.bakaus
Date: Fri Feb 13 04:42:42 2009
New Revision: 2074
Modified:
trunk/ui/ui.draggable.js
Log:
draggable: pageX/pageY already do not include scroll offsets in safari,
therefore it does not need to be substracted again (fixes #4142)
Modified: trunk/ui/ui.draggable.js
==============================================================================
--- trunk/ui/ui.draggable.js (original)
+++ trunk/ui/ui.draggable.js Fri Feb 13 04:42:42 2009
@@ -299,13 +299,13 @@
pos.top // The absolute mouse position
+ this.offset.relative.top * mod // Only for relative
positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.top * mod // The offsetParent's offset
without borders (offset + border)
- - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : (
scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod
+ - ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' ?
-this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 :
scroll.scrollTop() ) ) * mod)
),
left: (
pos.left // The absolute mouse position
+ this.offset.relative.left * mod // Only for relative
positioned nodes: Relative offset from element to offset parent
+ this.offset.parent.left * mod // The offsetParent's offset
without borders (offset + border)
- - ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() :
scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod
+ - ($.browser.safari ? 0 : ( this.cssPosition == 'fixed' ?
-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
scroll.scrollLeft() ) * mod)
)
};
@@ -356,14 +356,14 @@
- this.offset.click.top // Click offset (relative to the
element)
- this.offset.relative.top // Only for relative positioned
nodes: Relative offset from element to offset parent
- this.offset.parent.top // The offsetParent's offset
without borders (offset + border)
- + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : (
scrollIsRootNode ? 0 : scroll.scrollTop() ) )
+ + ($.browser.safari ? 0 : ( this.cssPosition == 'fixed'
&& !$.browser.safari ? -this.scrollParent.scrollTop() : (
scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
),
left: (
pageX // The absolute mouse position
- this.offset.click.left // Click offset (relative to the
element)
- this.offset.relative.left // Only for relative positioned
nodes: Relative offset from element to offset parent
- this.offset.parent.left // The offsetParent's offset
without borders (offset + border)
- + ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() :
scrollIsRootNode ? 0 : scroll.scrollLeft() )
+ + ($.browser.safari ? 0 : ( this.cssPosition == 'fixed'
&& !$.browser.safari ? -this.scrollParent.scrollLeft() : scrollIsRootNode ?
0 : scroll.scrollLeft() ))
)
};