Hey Guys,
i was playing around with the awesome Draggable Library and i wondered how i go about saving(DB) the postion of the currecnt object and load it again later?
https://greensock.com/draggable
i tried the following, but not sure if it's correct approach( since the values return includes translate3d):
onDragEnd: function() {
var obj = $(this._eventTarget);
// option one
var pos = item.position();;
Hi Crtl-Alt-Delete
you can easily get draggable current position by this.x / this.y , like this :
TweenLite.set('.box',{x:100,y:100}); // set position
Draggable.create('.box',{
onDragEnd:function(){
console.log(this.x+','+this.y) // get position
}
});