jQuery UI Widgets Forums Navigation Tree Guidance on using dragend 'tree'

This topic contains 3 replies, has 2 voices, and was last updated by  alastairwalker 8 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Guidance on using dragend 'tree' #82108

    alastairwalker
    Participant

    The documentation refers to:

    jQuery(instanceSelector).jqxTree({dragEnd: function(item, dropItem, args, dropPosition, tree) {});

    The documentation (and forum questions) provide little insight into how to use ‘tree’.

    All I can find is the comment ‘ // tree – the jqxTree’s jQuery object associated to the dropItem. If the tree’s id is ‘tree’, this returns $(“#tree”).

    If I however look at the tree object – the information is obscure i.e.

    ({0:{jQuery1112027691987898120807:315}, context:{jQuery1112027691987898120807:315}, length:1})

    using .toSource() to look at the object.

    Do you have any guidance / insight to offer on this?

    Alastair

    Guidance on using dragend 'tree' #82109

    alastairwalker
    Participant

    Perhaps I can provide further context to my question.

    Referring to the drag and drop demo:

    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtree/index.htm#demos/jqxtree/dragdrop.htm

    There are two possible modes of operation – drag and drop within a single tree, or drag and drop from one tree to the other.

    After a drag operation is started, and the drop is performed, how does one determine which tree is the target?

    Best regards,

    Alastair

    Guidance on using dragend 'tree' #82174

    Dimitar
    Participant

    Hello Alastair,

    In the dragEnd callback function, tree is the jQuery object of the target tree. In the case of the demo, if you drag from treeB to itself, in dragEnd tree.attr('id') will be “treeB”, and if you drag from treeB to treeA – “treeA”.

    A jQuery object is the result of a jQuery selection, e.g. $('#treeB').

    Best Regards,
    Dimitar

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

    Guidance on using dragend 'tree' #82209

    alastairwalker
    Participant

    Thank you very much!

    Alastair

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

You must be logged in to reply to this topic.