jQWidgets Forums

jQuery UI Widgets Forums General Discussions jqxScrollView : how to get left position when dropped ?

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • DISorganic
    Member

    Hello ! I’m using the jqxScrollView widget and I need your help.

    I want to track the left position of the hole div. I’ve modified the plugin a little bit in order to do so.
    You can see the modified demo here.

    As you can see, I can track the position while moving the images. But I want to be able to do the same when I drop it.
    I mean when I drop it, the position changes dynamically but I can’t track it.

    I managed to do something close but it works only when I release very quickly after I moved the image. I don’t know why but if I move then wait and release, it won’t track properly.

    This video may help to understand my point because I know it may not be clear.

    Here is …. the modified script. I’ve only made 2 changes at line 89-90 and 137-138.

    So how can I track completely the left position please ?

    Thanks.


    Peter Stoev
    Keymaster

    Hi,

    The Images are positioned horizontally in the widget. You can easily calculate the position of each image by using the widget’s width. For example, the first image’s left position is 0, the second image’s position is 0 + the widget’s width, the third image’s position is 0 + the widget’s width + the widget’s width and so on. By dragging an image, the ‘jqx-scrollview-inner-wrapper’ HTML Element’s margin-left is updated and if you wish you can track its changes.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.