Jump to content
Search Community

romaindr

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by romaindr

  1. Hi there,

     

    I am having trouble changing window scrolltop on drag an item.

     

    I'd like to create kind of minimap of may page while draging window scroll to position.

    But as soon as I add window scrollTo animation everything is flickering and I have weird y values... Any ideas?

     

    Draggable.create('.el', {
            type:"y",
            cursor:'drag',
            edgeResistance:0.5,
            zIndexBoost: false,
            lockAxis:true,
            bounds:'.drag',
            onDrag:function(e){
              window.scrollTo(0,this.y*3 )
            }
          });

     

    See the Pen OMBmqV by romaindr (@romaindr) on CodePen

×
×
  • Create New...