- var contentFx = new Fx.Scroll(element, {
- transition: Fx.Transitions.Bounce.easeOut,
- duration: 1000
- });
- var drag = new Drag(element, {
- modifiers: {x: 'scrollLeft', y: 'scrollTop'},
- invert: true,
- style: false,
- onStart: function(element, event){
- start = {
- y: event.page.y,
- x: event.page.x
- }
- },
- onComplete: function(element, event){
- contentFx.start(
- element.getScroll().x + start.x - event.page.x,
- element.getScroll().y + start.y - event.page.y
- );
- }
- });
I've found this script on the web : http://codecanyon.net/item/smooth-scrol ... view/70644
I'd like to create such a script, which could smoothly scroll or drag elements, mootools-style (which could be called Fx.Drag or Drag.Smooth...), but I'm way too bad at maths !
So I've mixed Drag and Fx.Scroll in a function :
The effect is there, but not smooth, right ?
Has anyone seen this or planned developing such a script ?
so long


