mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Draggable: Fixed coding style, moved properties out of prototype
This commit is contained in:
parent
c10acecdd4
commit
1f23656fe2
30
ui/jquery.ui.draggable.js
vendored
30
ui/jquery.ui.draggable.js
vendored
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user