Skip to content

Conversation

RusinovAnton
Copy link

@RusinovAnton RusinovAnton commented May 4, 2017

I needed custom styling for arrows when scrolling tabs reached edge so I made this changes.

edge = 'right'
}

stc.handleArrowsClassNames(edge);
Copy link
Author

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()
Copy link
Owner

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.

return;
}

console.log(parseInt(stc.scrollingTabsActiveOffset || 0, 10));
Copy link
Owner

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');
Copy link
Owner

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;
Copy link
Owner

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
Copy link
Owner

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,
Copy link
Owner

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.

@mikejacobson
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants