From bc465c3fca819c18bbf56124f4e2fa437a23cf29 Mon Sep 17 00:00:00 2001 From: ytkang Date: Sat, 28 Oct 2017 00:27:37 +0900 Subject: [PATCH 1/2] updated: getting current and end position of scroll --- src/sly.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sly.js b/src/sly.js index 1cd77a5..ff7bb96 100644 --- a/src/sly.js +++ b/src/sly.js @@ -553,6 +553,17 @@ } }; + /** + * Returns current position and end position. + * + * @param {Func} callback function + * + * @return {void} + */ + self.curPos = function(callback){ + callback(self.pos.cur, self.pos.end); + } + /** * Continuous move in a specified direction. * From f6e28b97d3a546249ed58b5ab5e7340d5463fe7b Mon Sep 17 00:00:00 2001 From: ytkang Date: Sat, 28 Oct 2017 00:28:47 +0900 Subject: [PATCH 2/2] updated: indent for curPos --- src/sly.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sly.js b/src/sly.js index ff7bb96..70a79a1 100644 --- a/src/sly.js +++ b/src/sly.js @@ -561,8 +561,8 @@ * @return {void} */ self.curPos = function(callback){ - callback(self.pos.cur, self.pos.end); - } + callback(self.pos.cur, self.pos.end); + } /** * Continuous move in a specified direction.