Keep Draggable in viewport

2 posts, 0 answers
  1. Joseph Roberts
    Joseph Roberts avatar
    47 posts
    Member since:
    Jul 2004

    Posted 15 Mar 2013 Link to this post

    I would like my draggable element to stay in view, so if I need to drag my item down the page, the page will automatically scroll until I find the place a need to drop it.  Is this possible? 

  2. Petur Subev
    Petur Subev avatar
    1882 posts

    Posted 19 Mar 2013 Link to this post

    Hello Joseph,

    I am afraid that such dragging behavior is not supported. However you can try to use the events which the draggable feature provides and scroll the element according to the drag position.


    The event argument object of the drag event expose position information such as x and y fields which you can use:
    axis: "X"
    client: 258
    delta: -1
    initialDelta: -12
    location: 458
    screen: 343
    startLocation: 470
    timeStamp: 1363703797136
    velocity: -0.03125

    Kind regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top