feat(draggable): new config option to move or not the dragged element

This commit is contained in:
vieron
2013-10-26 19:52:10 +02:00
parent 0f95624925
commit 4d9b2a84f1
+9 -6
View File
@@ -16,7 +16,8 @@
autoscroll: true,
ignore_dragging: ['INPUT', 'TEXTAREA', 'SELECT', 'BUTTON'],
handle: null,
container_width: 0 // 0 == auto
container_width: 0, // 0 == auto
move_element: true,
helper: false // or 'clone'
// drag: function(e){},
// start : function(e, ui){},
@@ -283,11 +284,13 @@
this.options.autoscroll && this.manage_scroll(data);
(this.helper ? this.$helper : this.$player).css({
'position': 'absolute',
'left' : offset.left,
'top' : offset.top
});
if (this.options.move_element) {
(this.helper ? this.$helper : this.$player).css({
'position': 'absolute',
'left' : data.position.left,
'top' : data.position.top
});
}
var last_position = this.last_position || data.position;
data.prev_position = last_position;