Skip to content

Commit

Permalink
feat(navbar): change color of navbar on navigation to different section
Browse files Browse the repository at this point in the history
  • Loading branch information
Imam committed Aug 18, 2016
1 parent 56e0a7f commit 265c9d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ export default class Tab extends HTMLElement {
const direction = numberSign(diff)
const selectedId = this.__selectedId + direction
const threshold = 0.20 * this.__dimensions.width
const count = this.__navItems.length
if (Math.abs(diff) > threshold && direction !== 0 && inRange(-1, count, selectedId)) {
if (Math.abs(diff) > threshold && direction !== 0 && this.__isMovable()) {
this.__deactivateSelectedNavItem()
this.__selectedId = selectedId
this.__showSelectedPane()
this.__updateSlider()
this.__activateSelectedNavItem()
} else {
this.__showSelectedPane()
this.__updateSlider()
Expand Down

0 comments on commit 265c9d2

Please sign in to comment.