mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Refine height calculation of template parameter docs
Instead of using a potentially weird fractional value like 3.2 lets use the floor(ed) value, e.g. 3. Reasoning: These fractions are not from text lines but optional margins between some of the lines. These margins should not be counted. Also increase the cut point from >=3 to >3. This is much closer to the original specification that talked about "2 lines plus x characters". See T273426. These "x characters" are the 3rd line. Bug: T310775 Change-Id: Ib5d1642d7967593dd5f13e556c6244fc44677af4
This commit is contained in:
parent
08e8581944
commit
217885013a
|
@ -132,7 +132,7 @@ ve.ui.MWExpandableContentElement.prototype.onDescriptionClick = function () {
|
|||
ve.ui.MWExpandableContentElement.prototype.updateSize = function () {
|
||||
this.toggle( true );
|
||||
|
||||
if ( this.getTextHeight() / this.getLineHeight() >= 3 ) {
|
||||
if ( Math.floor( this.getTextHeight() / this.getLineHeight() ) > 3 ) {
|
||||
if ( !this.$container ) {
|
||||
this.makeCollapsible();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue