Draggable: Fixed coding style, moved properties out of prototype

This commit is contained in:
= 2011-10-01 12:05:36 -04:00
parent c10acecdd4
commit 1f23656fe2

View File

@ -23,21 +23,6 @@ $.widget( "ui.draggable", {
}, },
// Either initialized element or the helper
dragEl : false,
position : {},
offset : {},
// Start X/Y coords of mouse before drag
startCoords : {},
// Start position of element before drag
startPosition : {},
// Start offset of element before drag
startOffset : {},
// TODO: actually remove data // TODO: actually remove data
destroy: function() { destroy: function() {
return this; return this;
@ -45,6 +30,21 @@ $.widget( "ui.draggable", {
_create: function() { _create: function() {
// Either initialized element or the helper
this.dragEl = false,
this.position = {},
this.offset = {},
// Start X/Y coords of mouse before drag
this.startCoords = {},
// Start position of element before drag
this.startPosition = {},
// Start offset of element before drag
this.startOffset = {},
this.scrollParent = this.element.scrollParent(); this.scrollParent = this.element.scrollParent();
// Static position elements can"t be moved with top/left // Static position elements can"t be moved with top/left