Draggable: Fix several whitespace issues

This commit is contained in:
Mike Sherov 2014-08-06 17:51:43 -04:00
parent 32bef7ad4e
commit 05ab5d7818

View File

@ -386,8 +386,8 @@ $.widget("ui.draggable", $.ui.mouse, {
} }
return { return {
top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
}; };
}, },
@ -409,10 +409,10 @@ $.widget("ui.draggable", $.ui.mouse, {
_cacheMargins: function() { _cacheMargins: function() {
this.margins = { this.margins = {
left: (parseInt(this.element.css("marginLeft"),10) || 0), left: (parseInt(this.element.css("marginLeft"), 10) || 0),
top: (parseInt(this.element.css("marginTop"),10) || 0), top: (parseInt(this.element.css("marginTop"), 10) || 0),
right: (parseInt(this.element.css("marginRight"),10) || 0), right: (parseInt(this.element.css("marginRight"), 10) || 0),
bottom: (parseInt(this.element.css("marginBottom"),10) || 0) bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
}; };
}, },
@ -429,7 +429,7 @@ $.widget("ui.draggable", $.ui.mouse, {
o = this.options, o = this.options,
document = this.document[ 0 ]; document = this.document[ 0 ];
this.relative_container = null; this.relativeContainer = null;
if ( !o.containment ) { if ( !o.containment ) {
this.containment = null; this.containment = null;
@ -480,7 +480,7 @@ $.widget("ui.draggable", $.ui.mouse, {
( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right, ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,
( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top - this.margins.bottom
]; ];
this.relative_container = c; this.relativeContainer = c;
}, },
_convertPositionTo: function(d, pos) { _convertPositionTo: function(d, pos) {
@ -533,8 +533,8 @@ $.widget("ui.draggable", $.ui.mouse, {
// If we are not dragging yet, we won't check for options // If we are not dragging yet, we won't check for options
if ( constrainPosition ) { if ( constrainPosition ) {
if ( this.containment ) { if ( this.containment ) {
if ( this.relative_container ){ if ( this.relativeContainer ){
co = this.relative_container.offset(); co = this.relativeContainer.offset();
containment = [ containment = [
this.containment[ 0 ] + co.left, this.containment[ 0 ] + co.left,
this.containment[ 1 ] + co.top, this.containment[ 1 ] + co.top,
@ -978,8 +978,8 @@ $.ui.plugin.add("draggable", "stack", {
start: function( event, ui, instance ) { start: function( event, ui, instance ) {
var min, var min,
o = instance.options, o = instance.options,
group = $.makeArray($(o.stack)).sort(function(a,b) { group = $.makeArray($(o.stack)).sort(function(a, b) {
return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0); return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
}); });
if (!group.length) { return; } if (!group.length) { return; }