mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Give sidebar open tab a bit more room for its label
This commit is contained in:
parent
68a5325849
commit
ae686bb15d
@ -388,7 +388,7 @@ RED.tabs = (function() {
|
|||||||
var visibleCount = collapsedButtonsRow.children(":visible").length;
|
var visibleCount = collapsedButtonsRow.children(":visible").length;
|
||||||
tabWidth = width - collapsedButtonsRow.width()-10;
|
tabWidth = width - collapsedButtonsRow.width()-10;
|
||||||
var maxTabWidth = 198;
|
var maxTabWidth = 198;
|
||||||
var minTabWidth = 80;
|
var minTabWidth = 120;
|
||||||
if (tabWidth <= minTabWidth || (tabWidth < maxTabWidth && visibleCount > 5)) {
|
if (tabWidth <= minTabWidth || (tabWidth < maxTabWidth && visibleCount > 5)) {
|
||||||
// The tab is too small. Hide the next button to make room
|
// The tab is too small. Hide the next button to make room
|
||||||
// Start at the end of the button row, -1 for the menu button
|
// Start at the end of the button row, -1 for the menu button
|
||||||
@ -786,7 +786,7 @@ RED.tabs = (function() {
|
|||||||
return ul.find("li.red-ui-tab").length;
|
return ul.find("li.red-ui-tab").length;
|
||||||
},
|
},
|
||||||
activeIndex: function() {
|
activeIndex: function() {
|
||||||
return ul.find("li.active").index()
|
return ul.find("li.active").index()
|
||||||
},
|
},
|
||||||
contains: function(id) {
|
contains: function(id) {
|
||||||
return ul.find("a[href='#"+id+"']").length > 0;
|
return ul.find("a[href='#"+id+"']").length > 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user