1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Adjust dragging tabs when partially scrolled

This commit is contained in:
Nick O'Leary 2016-09-27 00:05:43 +01:00
parent e4626ee52b
commit 15e828e975

View File

@ -264,8 +264,8 @@ RED.tabs = (function() {
} }
}, },
drag: function(event,ui) { drag: function(event,ui) {
ui.position.left += tabElements[tabDragIndex].left; ui.position.left += tabElements[tabDragIndex].left+scrollContainer.scrollLeft();
var tabCenter = ui.position.left + tabElements[tabDragIndex].width/2; var tabCenter = ui.position.left + tabElements[tabDragIndex].width/2 - scrollContainer.scrollLeft();
for (var i=0;i<tabElements.length;i++) { for (var i=0;i<tabElements.length;i++) {
if (i === tabDragIndex) { if (i === tabDragIndex) {
continue; continue;