Skip to content

Commit

Permalink
Update tabsDragUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Nov 29, 2012
1 parent b38c6f8 commit 2f21433
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions content/treestyletab/res/tabsDragUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
'TDUContext.tabScreenX = tabScreenX;\n' +
'TDUContext.translateX = translateX;\n' +
'TDUContext.utils.updateDraggedTabsTransform(TDUContext);\n' +
'tabs = TDUContext.utils.extractNotDraggedTabs(tabs, TDUContext);\n' +
'$&'
).replace(
'if (screenX > tabCenter)',
Expand All @@ -186,10 +187,6 @@
'if (newIndex >= oldIndex)',
'if (TDUContext.utils.checkDontMove(TDUContext)) return;\n' +
'$&'
).replace(
'draggedTab._dragData.animDropIndex = newIndex',
'tabs = TDUContext.utils.extractNotDraggedTabs(tabs, TDUContext);\n' +
'$&'
).replace(
'-tabWidth : tabWidth',
'/* $& */ -TDUContext.tabsWidth : TDUContext.tabsWidth'
Expand Down Expand Up @@ -274,6 +271,7 @@
// TDUContext.tabScreenX = tabScreenX;
// TDUContext.translateX = translateX;
// TDUContext.utils.updateDraggedTabsTransform(TDUContext);
// tabs = TDUContext.utils.extractNotDraggedTabs(tabs, TDUContext);
// let tabCenter = Math.round(tabScreenX + translateX + tabWidth / 2);
// let newIndex = -1;
// let oldIndex = "animDropIndex" in draggedTab._dragData ?
Expand Down Expand Up @@ -305,7 +303,6 @@
// newIndex++;
// if (newIndex < 0 || newIndex == oldIndex)
// return;
// tabs = TDUContext.utils.extractNotDraggedTabs(tabs, TDUContext);
// draggedTab._dragData.animDropIndex = newIndex;
//
// // Shift background tabs to leave a gap where the dragged tab
Expand All @@ -328,7 +325,7 @@
// return 0;
// }
// TDUContext.destroy();
//
//
// }
}
},
Expand Down

0 comments on commit 2f21433

Please sign in to comment.