[DE PE SSE] Fix two lines buttons in toolbar
This commit is contained in:
parent
2e49bc090c
commit
a7c2add386
|
@ -351,8 +351,9 @@ define([
|
||||||
getCaptionWithBreaks: function (caption) {
|
getCaptionWithBreaks: function (caption) {
|
||||||
var words = caption.split(' '),
|
var words = caption.split(' '),
|
||||||
newCaption = null,
|
newCaption = null,
|
||||||
maxWidth = !!this.menu ? 85 - 4 - 10 : 85 - 4;
|
maxWidth = 85 - 4;
|
||||||
if (words.length > 1) {
|
if (words.length > 1) {
|
||||||
|
maxWidth = !!this.menu || this.split === true ? maxWidth - 10 : maxWidth;
|
||||||
if (words.length < 3) {
|
if (words.length < 3) {
|
||||||
words[1] = getShortText(words[1], maxWidth);
|
words[1] = getShortText(words[1], maxWidth);
|
||||||
newCaption = words[0] + '<br>' + words[1];
|
newCaption = words[0] + '<br>' + words[1];
|
||||||
|
@ -368,14 +369,11 @@ define([
|
||||||
newCaption = words[0] + '<br>' + words[1];
|
newCaption = words[0] + '<br>' + words[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!!this.menu || this.split === true) {
|
|
||||||
var width = getWidthOfCaption(caption);
|
|
||||||
if (width < maxWidth) {
|
|
||||||
newCaption = caption + '<br>';
|
|
||||||
} else if (width > maxWidth * 2 - 10) {
|
|
||||||
newCaption = getShortText(caption, maxWidth * 2 - 10);
|
|
||||||
} else {
|
} else {
|
||||||
newCaption = caption;
|
var width = getWidthOfCaption(caption);
|
||||||
|
newCaption = width < maxWidth ? caption : getShortText(caption, maxWidth);
|
||||||
|
if (!!this.menu || this.split === true) {
|
||||||
|
newCaption += '<br>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return newCaption;
|
return newCaption;
|
||||||
|
|
|
@ -241,9 +241,8 @@
|
||||||
max-width: 85px;
|
max-width: 85px;
|
||||||
max-height: 22px;
|
max-height: 22px;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
white-space: pre-line;
|
white-space: pre;
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
padding: 0 2px;
|
padding: 0 2px;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue