jQWidgets Forums

jQuery UI Widgets Forums Angular dragItem, dropItem, dropPosition

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  MattB 7 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • dragItem, dropItem, dropPosition #94936

    MattB
    Participant

    In AngularJS I did something like this for Tree settings:

    $scope.treeSettings = {
    source: $scope.options,
    allowDrag: true,
    allowDrop: true,
    dragEnd: function (dragItem, dropItem, args, dropPosition, tree) {
    if (dragItem.level !== dropItem.level || dropPosition === “inside”) {
    return false;
    }
    setTimeout(function () { saveOrder(); }, 1);
    },
    dragStart: function () {
    return;
    }
    };
    $scope.createTree = true;

    In Angular 2, how do I get a reference to dragItem, dropItem and dropPosition?

    dragItem, dropItem, dropPosition #94945

    Peter Stoev
    Keymaster

    Hi MattB,

    You may look at the Tree’s Drag & Drop sample for Angular. It shows how to use the Drag and Drop API. Also the documentation page about Angular has examples about the API members.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    dragItem, dropItem, dropPosition #94975

    MattB
    Participant

    OK, thanks Peter. I see the difference between the dragEnd property vs. dragEnd event.

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

You must be logged in to reply to this topic.