Im using fa-draggable directive which works:
<fa-modifier fa-size="[90, 90]">
<fa-draggable fa-pipe-from="item.handler"
fa-options="draggableOptions"
fa-pipe-to="item.handler">
<fa-surface fa-background-color="'#268bd2'"
fa-pipe-to="item.handler">
A
</fa-surface>
</fa-draggable>
</fa-modifier>
And inside my controller I set:
$scope.draggableOptions = {
xRange: [-4, 4],
yRange: [-4, 4]
};
$scope.item.handler = new EventHandler();
$scope.item.handler.on('end', function (e) {
//return somehow to default position
});
How can I assure that after drag event is done, the draggable surface is returned to default position?
I found this question Drag a Famous surface and have it transition back to origin on mouseup? but I dont know how can I use "setPosition" function in my case?