mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Merge pull request #3238 from node-red/treeLister-gutter-fix
Fix treeList gutter calculation to handle floating gutters
This commit is contained in:
		| @@ -340,7 +340,7 @@ | ||||
|             if (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.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'); | ||||
|                 if (child.element) { | ||||
|                     $(child.element).css({ | ||||
| @@ -562,8 +562,9 @@ | ||||
|                 }).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({ | ||||
|                 display: "inline-block", | ||||
|                 "flex-shrink": 0, | ||||
|   | ||||
| @@ -563,7 +563,7 @@ RED.sidebar.info.outliner = (function() { | ||||
|         } | ||||
|     } | ||||
|     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) { | ||||
|             evt.preventDefault(); | ||||
|             evt.stopPropagation(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user