Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/resources/oojs-ui/oojs-ui.js b/resources/oojs-ui/oojs-ui.js
- index 1f13047..1c42bbc 100644
- --- a/resources/oojs-ui/oojs-ui.js
- +++ b/resources/oojs-ui/oojs-ui.js
- @@ -2459,6 +2459,7 @@ OO.ui.IndicatedElement.prototype.getIndicatorTitle = function () {
- * @param {jQuery} $label Label node, assigned to #$label
- * @param {Object} [config] Configuration options
- * @cfg {jQuery|string|Function} [label] Label nodes, text or a function that returns nodes or text
- + * @cfg {bool} [autoEllipsis] Whether to use autoEllipsis when fitting the label or not. Defaults to true.
- */
- OO.ui.LabeledElement = function OoUiLabeledElement( $label, config ) {
- // Config intialization
- @@ -2471,6 +2472,7 @@ OO.ui.LabeledElement = function OoUiLabeledElement( $label, config ) {
- // Initialization
- this.$label.addClass( 'oo-ui-labeledElement-label' );
- this.setLabel( config.label || this.constructor.static.label );
- + this.autoEllipsis = config.autoEllipsis;
- };
- /* Static Properties */
- @@ -2541,7 +2543,7 @@ OO.ui.LabeledElement.prototype.getLabel = function () {
- * @chainable
- */
- OO.ui.LabeledElement.prototype.fitLabel = function () {
- - if ( this.$label.autoEllipsis ) {
- + if ( this.$label.autoEllipsis && ( this.autoEllipsis === undefined || this.autoEllipsis ) ) {
- this.$label.autoEllipsis( { 'hasSpan': false, 'tooltip': true } );
- }
- return this;
Advertisement
Add Comment
Please, Sign In to add comment