-
Notifications
You must be signed in to change notification settings - Fork 21
add class for arrows when reached edge #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
edge = 'right' | ||
} | ||
|
||
stc.handleArrowsClassNames(edge); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mikejacobson yeah I've fckd diff with formatting, but here is main diff here
stc = evh.stc; | ||
|
||
stc.scrollMovement.incrementScrollLeft(); | ||
stc.scrollMovement.incrementScrollLeft() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you restore the ending semicolon here.
scrolling-tabs.js
Outdated
return; | ||
} | ||
|
||
console.log(parseInt(stc.scrollingTabsActiveOffset || 0, 10)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this console.log
.
|
||
smv.slideMovableContainerToLeftPos(); | ||
} else { | ||
stc.handleArrowsClassNames('left'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a condition so this function is only called if scrollingTabsActiveOffset
is set, so it doesn't affect other users.
stc.$movableContainer.stop().animate({ left: smv.getMovableContainerCssLeftVal() }, 'fast'); | ||
} | ||
|
||
var edge; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically the same comment as above: can you add a condition so this block of code (from here down to the call to handleArrowsClassNames
on line 645) only executes if scrollingTabsActiveOffset
is set, so other users aren't affected.
stc.eventHandlers = new EventHandlers(stc); | ||
stc.elementsHandler = new ElementsHandler(stc); | ||
|
||
stc.scrollingTabsActiveOffset = opts.scrollingTabsActiveOffset || 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add an ending semicolon here.
if (!actionsTaken.didScrollToActiveTab) { | ||
scrollMovement.scrollToActiveTab({ | ||
isOnTabsRefresh: options.isWatchingTabs | ||
isOnTabsRefresh: options.isWatchingTabs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the trailing comma here.
Other than the things I commented on, this looks good. If you can take care of those things, I can merge this in. Thanks for contributing! |
I needed custom styling for arrows when scrolling tabs reached edge so I made this changes.