Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #11 from maykar/dev
Browse files Browse the repository at this point in the history
Dev to master
  • Loading branch information
Ryan Meek committed May 21, 2019
2 parents dce7aad + 44fbb25 commit 5b589c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lovelace-swipe-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ let prevent_default = false; // Prevent browsers swipe action for back/forward.
// These options may not work as expected. ///////////////////////////////////

let animate = "none"; // none, swipe, fade, or flip. Must be in quotes.
// In between each transition your theme's background-color will be shown.

// CONFIG END ////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -99,6 +98,12 @@ function filterTabs() {
}

function click(index) {
if (
(activeTab == 0 && !wrap && left) ||
(activeTab == tabs.length - 1 && !wrap && !left)
) {
return;
}
if (animate == "swipe") {
let _in = left ? `${screen.width / 1.5}px` : `-${screen.width / 1.5}px`;
let _out = left ? `-${screen.width / 1.5}px` : `${screen.width / 1.5}px`;
Expand Down

0 comments on commit 5b589c6

Please sign in to comment.