mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #3238 from node-red/treeLister-gutter-fix
Fix treeList gutter calculation to handle floating gutters
This commit is contained in:
commit
d3efb9d7cc
@ -340,7 +340,7 @@
|
|||||||
if (child.depth !== parent.depth+1) {
|
if (child.depth !== parent.depth+1) {
|
||||||
child.depth = parent.depth+1;
|
child.depth = parent.depth+1;
|
||||||
// var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20));
|
// var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20));
|
||||||
var labelPaddingWidth = ((child.gutter?child.gutter.width()+2:0)+(child.depth*20));
|
var labelPaddingWidth = (((child.gutter&&!child.gutter.hasClass("red-ui-treeList-gutter-float"))?child.gutter.width()+2:0)+(child.depth*20));
|
||||||
child.treeList.labelPadding.width(labelPaddingWidth+'px');
|
child.treeList.labelPadding.width(labelPaddingWidth+'px');
|
||||||
if (child.element) {
|
if (child.element) {
|
||||||
$(child.element).css({
|
$(child.element).css({
|
||||||
@ -562,8 +562,9 @@
|
|||||||
}).appendTo(label)
|
}).appendTo(label)
|
||||||
|
|
||||||
}
|
}
|
||||||
// var labelPaddingWidth = (item.gutter?item.gutter.width()+2:0)+(depth*20);
|
|
||||||
var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (depth * 20)
|
var labelPaddingWidth = ((item.gutter&&!item.gutter.hasClass("red-ui-treeList-gutter-float"))?item.gutter.width()+2:0)+(depth*20);
|
||||||
|
|
||||||
item.treeList.labelPadding = $('<span>').css({
|
item.treeList.labelPadding = $('<span>').css({
|
||||||
display: "inline-block",
|
display: "inline-block",
|
||||||
"flex-shrink": 0,
|
"flex-shrink": 0,
|
||||||
|
@ -563,7 +563,7 @@ RED.sidebar.info.outliner = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function getGutter(n) {
|
function getGutter(n) {
|
||||||
var span = $("<span>",{class:"red-ui-info-outline-gutter"});
|
var span = $("<span>",{class:"red-ui-info-outline-gutter red-ui-treeList-gutter-float"});
|
||||||
var revealButton = $('<button type="button" class="red-ui-info-outline-item-control-reveal red-ui-button red-ui-button-small"><i class="fa fa-search"></i></button>').appendTo(span).on("click",function(evt) {
|
var revealButton = $('<button type="button" class="red-ui-info-outline-item-control-reveal red-ui-button red-ui-button-small"><i class="fa fa-search"></i></button>').appendTo(span).on("click",function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopPropagation();
|
evt.stopPropagation();
|
||||||
|
Loading…
Reference in New Issue
Block a user