mirror of
https://github.com/webslides/WebSlides.git
synced 2025-09-18 00:42:03 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cfd1f74b9b | ||
|
7bcafd9f7c | ||
|
71121169f0 |
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "webslides",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.3",
|
||||
"description": "Making HTML presentations easy",
|
||||
"main": "index.js",
|
||||
"main": "static/js/webslides.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/webslides/webslides.git"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import Easings from './easing';
|
||||
|
||||
const SCROLLABLE_CONTAINER = document.getElementById('webslides');
|
||||
let SCROLLABLE_CONTAINER = document.getElementById('webslides');
|
||||
|
||||
/**
|
||||
* Smoothly scrolls to a given Y position using Easing.Swing. It'll run a
|
||||
@@ -10,6 +10,8 @@ const SCROLLABLE_CONTAINER = document.getElementById('webslides');
|
||||
* @param {function} cb Callback function to call upon completion.
|
||||
*/
|
||||
export default function scrollTo(y, duration = 500, cb = () => {}) {
|
||||
SCROLLABLE_CONTAINER = SCROLLABLE_CONTAINER
|
||||
|| document.getElementById('webslides');
|
||||
const delta = y - SCROLLABLE_CONTAINER.scrollTop;
|
||||
const startLocation = SCROLLABLE_CONTAINER.scrollTop;
|
||||
const increment = 16;
|
||||
|
Reference in New Issue
Block a user