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 4597bfe
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions superslide-std.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ OSREC.superslide = function (p) {
me.p.onOpen = typeof me.p.onOpen == 'function' ? me.p.onOpen : function () {};
me.p.beforeClose = typeof me.p.beforeClose == 'function' ? me.p.beforeClose : function () {};
me.p.onClose = typeof me.p.onClose == 'function' ? me.p.onClose : function () {};
me.p.onDrag = typeof me.p.onDrag == 'function' ? me.p.onDrag : function () {};
me.p.onDrag = typeof me.p.onDrag == 'function' ? me.p.onDrag : function () {};

me.body = document;
me.p.isOpen = false;
Expand Down 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 4597bfe

Please sign in to comment.