Skip to content

Commit f75c876

Browse files
committed
Draggable: Style updates
Ref #14246 Ref gh-1588
1 parent f43311d commit f75c876

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

tests/unit/draggable/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ common.testWidget( "draggable", {
3737
distance: 1,
3838
iframeFix: false,
3939

40-
// callbacks
40+
// Callbacks
4141
create: null,
4242
drag: null,
4343
start: null,

tests/unit/draggable/core.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ test( "resizable handle with complex markup (#8756 / #8757)", function() {
6767
var handle = $(".ui-resizable-w div"),
6868
target = $( "#draggable1" ).draggable().resizable({ handles: "all" });
6969

70-
// todo: fix resizable so it doesn't require a mouseover
70+
// Todo: fix resizable so it doesn't require a mouseover
7171
handle.simulate("mouseover").simulate( "drag", { dx: -50 } );
7272
equal( target.width(), 250, "compare width" );
7373

74-
// todo: fix resizable so it doesn't require a mouseover
74+
// Todo: fix resizable so it doesn't require a mouseover
7575
handle.simulate("mouseover").simulate( "drag", { dx: 50 } );
7676
equal( target.width(), 200, "compare width" );
7777
});
@@ -215,7 +215,7 @@ test( "scroll offset with fixed ancestors", function() {
215215
$( [ "hidden", "auto", "scroll" ] ).each(function() {
216216
var overflow = this;
217217

218-
// http://bugs.jqueryui.com/ticket/9379 - position bug in scrollable div
218+
// Http://bugs.jqueryui.com/ticket/9379 - position bug in scrollable div
219219
// http://bugs.jqueryui.com/ticket/10147 - Wrong position in a parent with "overflow: hidden"
220220
test( "position in scrollable parent with overflow: " + overflow, function() {
221221
expect( 2 );
@@ -230,7 +230,7 @@ $( [ "hidden", "auto", "scroll" ] ).each(function() {
230230
dragDelta = 20,
231231
delta = 100,
232232

233-
// we scroll after each drag event, so subtract 1 from number of moves for expected
233+
// We scroll after each drag event, so subtract 1 from number of moves for expected
234234
expected = delta + ( ( moves - 1 ) * dragDelta ),
235235
element = $( "#dragged" ).draggable({
236236
drag: function() {
@@ -300,13 +300,13 @@ asyncTest( "blur behavior", function() {
300300

301301
testHelper.move( focusElement, 1, 1 );
302302

303-
// http://bugs.jqueryui.com/ticket/10527
303+
// Http://bugs.jqueryui.com/ticket/10527
304304
// Draggable: Can't select option in modal dialog (IE8)
305305
strictEqual( document.activeElement, focusElement.get( 0 ), "test element is focused after mousing down on itself" );
306306

307307
testHelper.move( element, 50, 50 );
308308

309-
// http://bugs.jqueryui.com/ticket/4261
309+
// Http://bugs.jqueryui.com/ticket/4261
310310
// active element should blur when mousing down on a draggable
311311
notStrictEqual( document.activeElement, focusElement.get( 0 ), "test element is no longer focused after mousing down on a draggable" );
312312
start();

tests/unit/draggable/options.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,12 @@ test( "connectToSortable, dragging out of a sortable", function() {
278278
// Position issue when connected to sortable
279279
deepEqual( ui.helper.offset(), offsetExpected, "draggable offset is correct" );
280280

281-
// http://bugs.jqueryui.com/ticket/7734
281+
// Http://bugs.jqueryui.com/ticket/7734
282282
// HTML IDs are removed when dragging to a Sortable
283283
equal( sortItem[ 0 ], dragHelper[ 0 ], "both have the same helper" );
284284
equal( sortItem.attr( "id" ), dragHelper.attr( "id" ), "both have the same id" );
285285

286-
// http://bugs.jqueryui.com/ticket/9481
286+
// Http://bugs.jqueryui.com/ticket/9481
287287
// connectToSortable causes sortable revert to fail on second attempt
288288
equal( sortable.sortable( "option", "revert" ), 100, "sortable revert behavior is preserved" );
289289
});
@@ -357,7 +357,7 @@ test( "connectToSortable, dragging multiple elements in and out of sortable", fu
357357
moves: 10
358358
});
359359

360-
// http://bugs.jqueryui.com/ticket/9675
360+
// Http://bugs.jqueryui.com/ticket/9675
361361
// Animation issue with revert and connectToSortable
362362
sortable.one( "sortstop", function( event, ui ) {
363363
ok( !$.contains( document, ui.placeholder[ 0 ] ), "placeholder was removed" );
@@ -419,7 +419,7 @@ test( "connectToSortable, dragging through a sortable", function() {
419419
sortable = $( "#sortable2" ).sortable(),
420420
sortableOffset = sortable.offset();
421421

422-
// http://bugs.jqueryui.com/ticket/10669
422+
// Http://bugs.jqueryui.com/ticket/10669
423423
// Draggable: Position issue with connectToSortable
424424
draggable.one( "dragstop", function() {
425425
equal( draggable.parent().attr( "id" ), "sortable", "restored draggable to original parent" );
@@ -1022,7 +1022,7 @@ asyncTest( "revert and revertDuration", function() {
10221022
}
10231023
});
10241024

1025-
// animation are async, so test for it asynchronously
1025+
// Animation are async, so test for it asynchronously
10261026
testHelper.move( element, 50, 50 );
10271027
setTimeout( function() {
10281028
ok( $( "#draggable2" ).is( ":animated" ), "revert: true with revertDuration should animate" );
@@ -1191,7 +1191,7 @@ test( "snap, snapMode, and snapTolerance", function( assert ) {
11911191
}),
11921192
element2 = $( "#draggable2" ).draggable();
11931193

1194-
// http://bugs.jqueryui.com/ticket/9724
1194+
// Http://bugs.jqueryui.com/ticket/9724
11951195
// Draggable: Snapping coordinates thrown off by margin on draggable
11961196
element.css( "margin", "3px" );
11971197

ui/widgets/draggable.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ $.widget("ui.draggable", $.ui.mouse, {
6565
stack: false,
6666
zIndex: false,
6767

68-
// callbacks
68+
// Callbacks
6969
drag: null,
7070
start: null,
7171
stop: null
@@ -108,7 +108,7 @@ $.widget("ui.draggable", $.ui.mouse, {
108108

109109
this._blurActiveElement( event );
110110

111-
// among others, prevent a drag on a resizable-handle
111+
// Among others, prevent a drag on a resizable-handle
112112
if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
113113
return false;
114114
}
@@ -362,7 +362,7 @@ $.widget("ui.draggable", $.ui.mouse, {
362362
helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
363363
}
364364

365-
// http://bugs.jqueryui.com/ticket/9446
365+
// Http://bugs.jqueryui.com/ticket/9446
366366
// a helper function can return the original element
367367
// which wouldn't have been set to relative in _create
368368
if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
@@ -700,7 +700,7 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
700700
if ( sortable && !sortable.options.disabled ) {
701701
draggable.sortables.push( sortable );
702702

703-
// refreshPositions is called at drag start to refresh the containerCache
703+
// RefreshPositions is called at drag start to refresh the containerCache
704704
// which is used in drag. This ensures it's initialized and synchronized
705705
// with any changes that might have happened on the page since initialization.
706706
sortable.refreshPositions();
@@ -825,7 +825,7 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
825825
this.refreshPositions();
826826
});
827827

828-
// hack so receive/update callbacks work (mostly)
828+
// Hack so receive/update callbacks work (mostly)
829829
draggable.currentItem = draggable.element;
830830
sortable.fromOutside = draggable;
831831
}
@@ -854,7 +854,7 @@ $.ui.plugin.add( "draggable", "connectToSortable", {
854854
sortable._trigger( "out", event, sortable._uiHash( sortable ) );
855855
sortable._mouseStop( event, true );
856856

857-
// restore sortable behaviors that were modfied
857+
// Restore sortable behaviors that were modfied
858858
// when the draggable entered the sortable area (#9481)
859859
sortable.options.revert = sortable.options._revert;
860860
sortable.options.helper = sortable.options._helper;

0 commit comments

Comments
 (0)