Changeset 1313

Show
Ignore:
Timestamp:
12/30/08 02:05:51 (14 months ago)
Author:
paul.bakaus
Message:

demos: added opacity, revert and scroll demos
draggable: fixed positioning issue with relative positioned elements relative to the body during scroll

Location:
trunk
Files:
3 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/demos/draggable/index.html

    r1309 r1313  
    1717                <dd><a href="handle.html">Handle</a></dd> 
    1818                <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> 
    1922</dl> 
    2023 
  • trunk/tests/visual/draggable.scroll.html

    r1137 r1313  
    4747</head> 
    4848<body> 
     49 
     50<div class='draggable' style='z-index: 1000;'>Simple draggable</div> 
     51<br clear='both' /> 
     52 
    4953 
    5054<div class='container' style="overflow:scroll;"> 
  • trunk/ui/ui.draggable.js

    r1098 r1313  
    589589 
    590590 
    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: 
    592592                // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent 
    593593                // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that 
     
    595595                if(scrolled !== false && i.cssPosition == 'absolute' && i.scrollParent[0] != document && $.ui.contains(i.scrollParent[0], i.offsetParent[0])) { 
    596596                        i.offset.parent = i._getParentOffset(); 
     597                         
    597598                } 
     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                 
    598608 
    599609        }