Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4797

Show
Ignore:
Timestamp:
08/20/06 20:02:13 (2 years ago)
Author:
madrobby
Message:

Fix an issue with redrawing ghosted draggables that are inside a scrolled container, fixes #3860 [thx gkupps, tsukue]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • spinoffs/scriptaculous/CHANGELOG

    r4796 r4797  
    11*SVN* 
     2 
     3* Fix an issue with redrawing ghosted draggables that are inside a scrolled container, fixes #3860 [thx gkupps, tsukue] 
    24 
    35* Added a custom exception to all base effects when used on non-existing DOM elements, added a assertRaise method to unit tests 
  • spinoffs/scriptaculous/src/dragdrop.js

    r4785 r4797  
    426426  draw: function(point) { 
    427427    var pos = Position.cumulativeOffset(this.element); 
     428    if(this.options.ghosting) { 
     429      Position.prepare(); 
     430      var r   = Position.realOffset(this.element); 
     431      window.status = r.inspect(); 
     432      pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; 
     433    } 
     434     
    428435    var d = this.currentDelta(); 
    429436    pos[0] -= d[0]; pos[1] -= d[1]; 
  • spinoffs/scriptaculous/test/functional/dragdrop4_test.html

    r2067 r4797  
    3131<script type="text/javascript" language="javascript" charset="utf-8"> 
    3232// <![CDATA[ 
     33  Position.includeScrollOffsets = true; 
     34 
    3335  new Draggable('absolute_positioned_element',{ghosting: true}); 
    3436  new Draggable('absolute_positioned_element2',{ghosting: true, revert:true}); 
  • spinoffs/scriptaculous/test/functional/index.html

    r4785 r4797  
    4343  <li><a href="dragdrop6_test.html" target="test">dragdrop6_test: snap option</a></li> 
    4444  <li><a href="dragdrop7_test.html" target="test">dragdrop7_test</a></li> 
     45  <li><a href="dragdrop8_test.html" target="test">dragdrop8_test</a></li> 
    4546</ul> 
    4647<ul>