Question

I have some sets of raphael elements that are draggable, sometimes the elements animate for a halv a sec, but if the set/element is draged while animating the animation stops. I want to make my elements undraggable when i'm animating so i'm sure that the animation will always complete. Is there any way? I tried using undrag() but it didn't work. I'm not using any plugin for dragging, just created my own start,move and up methods for set.drag(start,move,up)

Thanks

Était-ce utile?

La solution

I've got it to work with undrag method. I just needed to add undrag on each element of the set instead the set itself(i'm calling drag on the set so it seems wrong) and the it worked.

function undragAll() {
    $.each(screenSets, function (index, set) {
        $.each(set, function (index, setEl) {
            set[index].undrag();
        });
    });
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top