Skip to content

Commit 00579f8

Browse files
author
Gabriel Schulhof
committed
Revert "Popup: Factor our width constraint code for reuse."
This reverts commit 3636c70.
1 parent f401b22 commit 00579f8

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

js/widgets/popup.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -412,26 +412,21 @@ define( [
412412
}
413413
},
414414

415-
_clampPopupWidth: function() {
416-
var winCoords = windowCoords(),
417-
// rectangle within which the popup must fit
415+
// Try and center the overlay over the given coordinates
416+
_placementCoords: function( desired ) {
417+
// rectangle within which the popup must fit
418+
var
419+
winCoords = windowCoords(),
418420
rc = {
419421
x: this._tolerance.l,
420422
y: winCoords.y + this._tolerance.t,
421423
cx: winCoords.cx - this._tolerance.l - this._tolerance.r,
422424
cy: winCoords.cy - this._tolerance.t - this._tolerance.b
423-
};
425+
},
426+
menuSize, ret;
424427

425428
// Clamp the width of the menu before grabbing its size
426429
this._ui.container.css( "max-width", rc.cx );
427-
return rc;
428-
},
429-
430-
// Try and center the overlay over the given coordinates
431-
_placementCoords: function( desired ) {
432-
var rc, menuSize, ret;
433-
434-
rc = this._clampPopupWidth();
435430
menuSize = {
436431
cx: this._ui.container.outerWidth( true ),
437432
cy: this._ui.container.outerHeight( true )

0 commit comments

Comments
 (0)