mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Open subflow tab next to active tab rather than at the end
This commit is contained in:
		| @@ -785,6 +785,9 @@ RED.tabs = (function() { | ||||
|             count: function() { | ||||
|                 return ul.find("li.red-ui-tab").length; | ||||
|             }, | ||||
|             activeIndex: function() { | ||||
|                 return ul.find("li.active").index()     | ||||
|             }, | ||||
|             contains: function(id) { | ||||
|                 return ul.find("a[href='#"+id+"']").length > 0; | ||||
|             }, | ||||
|   | ||||
| @@ -493,7 +493,11 @@ RED.workspaces = (function() { | ||||
|             if (!workspace_tabs.contains(id)) { | ||||
|                 var sf = RED.nodes.subflow(id); | ||||
|                 if (sf) { | ||||
|                     addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.svg",label:sf.name, closeable: true}); | ||||
|                     addWorkspace( | ||||
|                         {type:"subflow",id:id,icon:"red/images/subflow_tab.svg",label:sf.name, closeable: true}, | ||||
|                         null, | ||||
|                         workspace_tabs.activeIndex()+1 | ||||
|                     ); | ||||
|                 } else { | ||||
|                     return; | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user