Skip to content

Commit

Permalink
Change spaces to tabs to stick with original style
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDB committed Sep 14, 2018
1 parent 15e46f8 commit b64b96e
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions superslide-std.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ OSREC.superslide = function (p) {
var sliderStartPosition = me.p.isOpen ? me.p.slider.offsetWidth : 0;
var translation = 0;
var delta = 0;
var completion = 0;
var completion = 0;

var touchMoveFunction = function (e) {

Expand All @@ -116,15 +116,15 @@ OSREC.superslide = function (p) {
translation = 0;
}

if (delta >= me.p.slider.offsetWidth) {
completion = 1;
} else if (delta <= 0) {
completion = 0;
} else {
completion = delta / me.p.slider.offsetWidth;
}
if (delta >= me.p.slider.offsetWidth) {
completion = 1;
} else if (delta <= 0) {
completion = 0;
} else {
completion = delta / me.p.slider.offsetWidth;
}

me.p.onDrag(completion);
me.p.onDrag(completion);

me.p.slider.style.transform = `translate3d(${translation}px, 0, 0)`;
if (me.p.slideContent) {
Expand Down Expand Up @@ -179,7 +179,7 @@ OSREC.superslide = function (p) {
var sliderStartPosition = me.p.isOpen ? -me.p.slider.offsetWidth : 0;
var translation = 0;
var delta = 0;
var completion = 0;
var completion = 0;

var touchMoveFunction = function (e) {

Expand All @@ -193,15 +193,15 @@ OSREC.superslide = function (p) {
translation = 0;
}

if ((delta * -1) >= me.p.slider.offsetWidth) {
completion = 1;
} else if ((delta * -1) <= 0) {
completion = 0;
} else {
completion = (delta * -1) / me.p.slider.offsetWidth;
}
if ((delta * -1) >= me.p.slider.offsetWidth) {
completion = 1;
} else if ((delta * -1) <= 0) {
completion = 0;
} else {
completion = (delta * -1) / me.p.slider.offsetWidth;
}

me.p.onDrag(completion);
me.p.onDrag(completion);

me.p.slider.style.transform = `translate3d(${translation}px, 0, 0)`;
if (me.p.slideContent) {
Expand Down

0 comments on commit b64b96e

Please sign in to comment.