Changeset 1313
- Timestamp:
- 12/30/08 02:05:51 (14 months ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 modified
-
demos/draggable/index.html (modified) (1 diff)
-
demos/draggable/opacity.html (added)
-
demos/draggable/revert.html (added)
-
demos/draggable/scroll.html (added)
-
tests/visual/draggable.scroll.html (modified) (1 diff)
-
ui/ui.draggable.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/demos/draggable/index.html
r1309 r1313 17 17 <dd><a href="handle.html">Handle</a></dd> 18 18 <dd><a href="helper.html">Helper</a></dd> 19 <dd><a href="opacity.html">Opacity</a></dd> 20 <dd><a href="revert.html">Revert</a></dd> 21 <dd><a href="scroll.html">Scroll</a></dd> 19 22 </dl> 20 23 -
trunk/tests/visual/draggable.scroll.html
r1137 r1313 47 47 </head> 48 48 <body> 49 50 <div class='draggable' style='z-index: 1000;'>Simple draggable</div> 51 <br clear='both' /> 52 49 53 50 54 <div class='container' style="overflow:scroll;"> -
trunk/ui/ui.draggable.js
r1098 r1313 589 589 590 590 591 // This is a special case where we need to modify a offset calculated on start, since the following happened:591 // This is a special case where we need to modify a offset calculated on start, since the following happened: 592 592 // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent 593 593 // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that … … 595 595 if(scrolled !== false && i.cssPosition == 'absolute' && i.scrollParent[0] != document && $.ui.contains(i.scrollParent[0], i.offsetParent[0])) { 596 596 i.offset.parent = i._getParentOffset(); 597 597 598 } 599 600 // This is another very weird special case that only happens for relative elements: 601 // 1. If the css position is relative 602 // 2. and the scroll parent is the document or similar to the offset parent 603 // we have to refresh the relative offset during the scroll so there are no jumps 604 if(scrolled !== false && i.cssPosition == 'relative' && !(i.scrollParent[0] != document && i.scrollParent[0] != i.offsetParent[0])) { 605 i.offset.relative = i._getRelativeOffset(); 606 } 607 598 608 599 609 }