Skip to content

Commit 13be9a0

Browse files
committed
Rename ui-scope variables, so their names don't clash
1 parent 1c9bdc4 commit 13be9a0

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

ui/jquery.ui.core.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
}(function( $ ) {
2020

21-
var uuid = 0,
21+
var coreUuid = 0,
2222
runiqueId = /^ui-id-\d+$/;
2323

2424
// $.ui might exist from components with no dependencies, e.g., $.ui.position
@@ -83,7 +83,7 @@ $.fn.extend({
8383
uniqueId: function() {
8484
return this.each(function() {
8585
if ( !this.id ) {
86-
this.id = "ui-id-" + (++uuid);
86+
this.id = "ui-id-" + (++coreUuid);
8787
}
8888
});
8989
},

ui/jquery.ui.droppable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131
}(function( $ ) {
3232

33-
function isOverAxis( x, reference, size ) {
33+
function droppableIsOverAxis( x, reference, size ) {
3434
return ( x >= reference ) && ( x < ( reference + size ) );
3535
}
3636

@@ -245,7 +245,7 @@ $.ui.intersect = function( draggable, droppable, toleranceMode ) {
245245
case "pointer":
246246
draggableLeft = ( ( draggable.positionAbs || draggable.position.absolute ).left + ( draggable.clickOffset || draggable.offset.click ).left );
247247
draggableTop = ( ( draggable.positionAbs || draggable.position.absolute ).top + ( draggable.clickOffset || draggable.offset.click ).top );
248-
return isOverAxis( draggableTop, t, droppable.proportions().height ) && isOverAxis( draggableLeft, l, droppable.proportions().width );
248+
return droppableIsOverAxis( draggableTop, t, droppable.proportions().height ) && droppableIsOverAxis( draggableLeft, l, droppable.proportions().width );
249249
case "touch":
250250
return (
251251
( y1 >= t && y1 <= b ) || // Top edge touching

ui/jquery.ui.effect-blind.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525
}(function( $ ) {
2626

27-
var rvertical = /up|down|vertical/,
27+
var blindRVertical = /up|down|vertical/,
2828
rpositivemotion = /up|left|vertical|horizontal/;
2929

3030
$.effects.effect.blind = function( o, done ) {
@@ -33,7 +33,7 @@ $.effects.effect.blind = function( o, done ) {
3333
props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
3434
mode = $.effects.setMode( el, o.mode || "hide" ),
3535
direction = o.direction || "up",
36-
vertical = rvertical.test( direction ),
36+
vertical = blindRVertical.test( direction ),
3737
ref = vertical ? "height" : "width",
3838
ref2 = vertical ? "top" : "left",
3939
motion = rpositivemotion.test( direction ),

ui/jquery.ui.position.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ var cachedScrollbarWidth,
2424
max = Math.max,
2525
abs = Math.abs,
2626
round = Math.round,
27-
rhorizontal = /left|center|right/,
28-
rvertical = /top|center|bottom/,
27+
positionRHorizontal = /left|center|right/,
28+
positionRVertical = /top|center|bottom/,
2929
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
3030
rposition = /^\w+/,
3131
rpercent = /%$/,
@@ -156,14 +156,14 @@ $.fn.position = function( options ) {
156156
verticalOffset;
157157

158158
if ( pos.length === 1) {
159-
pos = rhorizontal.test( pos[ 0 ] ) ?
159+
pos = positionRHorizontal.test( pos[ 0 ] ) ?
160160
pos.concat( [ "center" ] ) :
161-
rvertical.test( pos[ 0 ] ) ?
161+
positionRVertical.test( pos[ 0 ] ) ?
162162
[ "center" ].concat( pos ) :
163163
[ "center", "center" ];
164164
}
165-
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
166-
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
165+
pos[ 0 ] = positionRHorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
166+
pos[ 1 ] = positionRVertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
167167

168168
// calculate offsets
169169
horizontalOffset = roffset.exec( pos[ 0 ] );

ui/jquery.ui.sortable.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
}
2929
}(function( $ ) {
3030

31-
function isOverAxis( x, reference, size ) {
31+
function sortableIsOverAxis( x, reference, size ) {
3232
return ( x >= reference ) && ( x < ( reference + size ) );
3333
}
3434

@@ -567,8 +567,8 @@ $.widget("ui.sortable", $.ui.mouse, {
567567

568568
_intersectsWithPointer: function(item) {
569569

570-
var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
571-
isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
570+
var isOverElementHeight = (this.options.axis === "x") || sortableIsOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
571+
isOverElementWidth = (this.options.axis === "y") || sortableIsOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
572572
isOverElement = isOverElementHeight && isOverElementWidth,
573573
verticalDirection = this._getDragVerticalDirection(),
574574
horizontalDirection = this._getDragHorizontalDirection();
@@ -585,8 +585,8 @@ $.widget("ui.sortable", $.ui.mouse, {
585585

586586
_intersectsWithSides: function(item) {
587587

588-
var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
589-
isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
588+
var isOverBottomHalf = sortableIsOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
589+
isOverRightHalf = sortableIsOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
590590
verticalDirection = this._getDragVerticalDirection(),
591591
horizontalDirection = this._getDragHorizontalDirection();
592592

@@ -870,7 +870,7 @@ $.widget("ui.sortable", $.ui.mouse, {
870870
if(this.items[j].item[0] === this.currentItem[0]) {
871871
continue;
872872
}
873-
if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
873+
if (floating && !sortableIsOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
874874
continue;
875875
}
876876
cur = this.items[j].item.offset()[posProperty];

ui/jquery.ui.widget.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
}(function( $ ) {
2020

21-
var uuid = 0,
21+
var widgetUuid = 0,
2222
slice = Array.prototype.slice,
2323
_cleanData = $.cleanData;
2424
$.cleanData = function( elems ) {
@@ -236,7 +236,7 @@ $.Widget.prototype = {
236236
_createWidget: function( options, element ) {
237237
element = $( element || this.defaultElement || this )[ 0 ];
238238
this.element = $( element );
239-
this.uuid = uuid++;
239+
this.uuid = widgetUuid++;
240240
this.eventNamespace = "." + this.widgetName + this.uuid;
241241
this.options = $.widget.extend( {},
242242
this.options,

0 commit comments

Comments
 (0)