mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Clean up
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
734f03c84e
commit
8a12500d26
@ -56,9 +56,9 @@ export const DockTabs = ({ tabs, autoFocus, selectedTab, onChangeTab }: DockTabs
|
||||
};
|
||||
|
||||
const updateScrollbarVisibility = () => {
|
||||
const allTabsShrinked = getTabElements().every(tab => tab.offsetWidth == minTabSize.current);
|
||||
const allTabsShrunk = getTabElements().every(tab => tab.offsetWidth == minTabSize.current);
|
||||
|
||||
setShowScrollbar(allTabsShrinked);
|
||||
setShowScrollbar(allTabsShrunk);
|
||||
};
|
||||
|
||||
const scrollTabsWithMouseWheel = (left: number) => {
|
||||
|
||||
@ -93,7 +93,7 @@ class NonInjectedDock extends React.Component<DockProps & Dependencies> {
|
||||
const nextIndex = currentIndex + direction;
|
||||
|
||||
// check if moving to the next or previous tab is possible.
|
||||
if (currentIndex!== -1 && (nextIndex >= tabs.length || nextIndex < 0)) return;
|
||||
if (nextIndex >= tabs.length || nextIndex < 0) return;
|
||||
|
||||
const nextElement = tabs[nextIndex];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user