Skip to content

Commit c601791

Browse files
committed
Resizable: Add backcompat for ghost option
1 parent 65a89e4 commit c601791

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ui/resizable.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ $.widget("ui.resizable", $.ui.mouse, {
184184

185185
axis.css({ zIndex: o.zIndex });
186186

187-
// TODO : What's going on here?
187+
// We only add the grip icon to the se corner if se is one of the handles
188188
if ("se" === handle) {
189189
this._addClass( axis, null, "ui-icon ui-icon-gripsmall-diagonal-se" );
190190
}
@@ -1079,7 +1079,14 @@ $.ui.plugin.add("resizable", "ghost", {
10791079
left: 0,
10801080
top: 0
10811081
});
1082-
this._addClass( that.ghost, "ui-resizable-ghost" );
1082+
that._addClass( that.ghost, "ui-resizable-ghost" );
1083+
1084+
// DEPRECATED TODO: remove after 1.12
1085+
if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) {
1086+
1087+
// Ghost option
1088+
that.ghost.addClass( this.options.ghost );
1089+
}
10831090

10841091
that.ghost.appendTo(that.helper);
10851092

@@ -1179,13 +1186,6 @@ $.ui.plugin.add("resizable", "grid", {
11791186

11801187
});
11811188

1182-
// DEPRECATED
1183-
if ( $.uiBackCompat !== false ) {
1184-
1185-
// Ghost option
1186-
// TODO add backcompat once i know how $.ui.plugin works...
1187-
}
1188-
11891189
return $.ui.resizable;
11901190

11911191
}));

0 commit comments

Comments
 (0)