Skip to content
Permalink
Browse files

Remove trailing spaces

  • Loading branch information...
eduardolundgren committed Jan 24, 2009
1 parent 53c9696 commit 16a6bf3dd8ec470a446e1b2044a2de81bce1f83b
Showing with 37 additions and 37 deletions.
  1. +7 −7 ui/ui.draggable.js
  2. +30 −30 ui/ui.resizable.js
@@ -612,7 +612,7 @@ $.ui.plugin.add("draggable", "scroll", {
else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
}

if(!o.axis || o.axis != 'y') {
if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
@@ -621,21 +621,21 @@ $.ui.plugin.add("draggable", "scroll", {
}

} else {

if(!o.axis || o.axis != 'x') {
if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
}

if(!o.axis || o.axis != 'y') {
if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
}

}

if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
@@ -715,9 +715,9 @@ $.ui.plugin.add("draggable", "snap", {

$.ui.plugin.add("draggable", "stack", {
start: function(event, ui) {

var o = $(this).data("draggable").options;

var group = $.makeArray($(o.stack.group)).sort(function(a,b) {
return (parseInt($(a).css("zIndex"),10) || o.stack.min) - (parseInt($(b).css("zIndex"),10) || o.stack.min);
});
@@ -727,7 +727,7 @@ $.ui.plugin.add("draggable", "stack", {
});

this[0].style.zIndex = o.stack.min + group.length;

}
});

@@ -16,9 +16,9 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {

_init: function() {

var self = this, o = this.options;
var self = this, o = this.options;
this.element.addClass("ui-resizable");

$.extend(this, {
_aspectRatio: !!(o.aspectRatio),
aspectRatio: o.aspectRatio,
@@ -64,7 +64,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {

// fix handlers offset
this._proportionallyResize();

}

this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
@@ -74,10 +74,10 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
var n = this.handles.split(","); this.handles = {};

for(var i = 0; i < n.length; i++) {

var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');

// increase zIndex of sw, se, ne, nw axis
//TODO : this modifies original option
if(/sw|se|ne|nw/.test(handle)) axis.css({ zIndex: ++o.zIndex });
@@ -95,11 +95,11 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
}

this._renderAxis = function(target) {

target = target || this.element;

for(var i in this.handles) {

if(this.handles[i].constructor == String)
this.handles[i] = $(this.handles[i], this.element).show();

@@ -124,19 +124,19 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
target.css(padPos, padWrapper);

this._proportionallyResize();

}

//TODO: What's that good for? There's not anything to be executed left
if(!$(this.handles[i]).length)
continue;

}
};

//TODO: make renderAxis a prototype function
this._renderAxis(this.element);

this._handles = $('.ui-resizable-handle', this.element);

if (o.disableSelection)
@@ -171,11 +171,11 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {

//Initialize the mouse interaction
this._mouseInit();

},

destroy: function() {

this._mouseDestroy();

var _destroy = function(exp) {
@@ -196,9 +196,9 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
})
).end().remove();
}

_destroy(this.originalElement);

},

_mouseCapture: function(event) {
@@ -216,7 +216,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {

var o = this.options, iniPos = this.element.position(), el = this.element,
num = function(v) { return parseInt(v, 10) || 0; }, ie6 = $.browser.msie && $.browser.version < 7;

this.resizing = true;
this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };

@@ -327,7 +327,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {

if (this._helper) this.helper.remove();
return false;

},

_updateCache: function(data) {
@@ -386,44 +386,44 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
},

_proportionallyResize: function() {

var o = this.options;
if (!this.proportionallyResize.length) return;
var element = this.helper || this.element;

for (var i=0; i < this.proportionallyResize.length; i++) {

var prel = this.proportionallyResize[i];

if (!this.borderDif) {
var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];

this.borderDif = $.map(b, function(v, i) {
var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
return border + padding;
});
}

if ($.browser.msie && !(!($(element).is(':hidden') || $(element).parents(':hidden').length)))
continue;

prel.css({
height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
});

};

},

_renderProxy: function() {

var el = this.element, o = this.options;
this.elementOffset = el.offset();

if(this._helper) {

this.helper = this.helper || $('<div style="overflow:hidden;"></div>');

// fix ie6 offset TODO: This seems broken
@@ -447,7 +447,7 @@ $.widget("ui.resizable", $.extend({}, $.ui.mouse, {
} else {
this.helper = this.element;
}

},

_change: {
@@ -538,7 +538,7 @@ $.extend($.ui.resizable, {
$.ui.plugin.add("resizable", "alsoResize", {

start: function(event, ui) {

var o = ui.options, self = $(this).data("resizable"),

_store = function(exp) {
@@ -730,7 +730,7 @@ $.ui.plugin.add("resizable", "containment", {
$.ui.plugin.add("resizable", "ghost", {

start: function(event, ui) {

var o = ui.options, self = $(this).data("resizable"), pr = o.proportionallyResize, cs = self.size;

self.ghost = self.originalElement.clone();

0 comments on commit 16a6bf3

Please sign in to comment.
You can’t perform that action at this time.