pec1985/TiDraggable

Changing zIndex or left or top causes reset ?

Opened this issue · 1 comments

Hi first off great module the dragging is super smooth !

One question, I am trying to change the zIndex on the end event. As soon as I set e.source.setZIndex(3) the source seems to get reset to it's original position!?

So how can I change the Draggable view position / properties after it has been dragged ?

Thanks

Humm I seem to have figured out a workaround...

On the end event I re-assign the top, left of the e.source to itself....
This seems to allow me to keep the last position values and allows me to modify the zIndex without the nasty position reset.

el1.addEventListener('end', function(e)
{
    e.source.setLeft(e.source.left);
    e.source.setTop(e.source.top);

    e.source.setZIndex(<SOME CALCULATED VALUE>);
});

Thanks again for the module.