Timeline is now draggable

This commit is contained in:
2019-08-08 12:06:16 +02:00
parent 56910a8c58
commit 9aef7bb460
4 changed files with 24 additions and 22 deletions
+11 -10
View File
@@ -3444,7 +3444,6 @@
// stack!
const distanceToTop = this.container.y;
const distanceToBottom = this.opts.maxHeight - this.container.y - this.__initHeight;
if (distanceToTop > 0) {
throwProps.y.end = 0;
} else if (distanceToBottom > 0) {
@@ -12325,6 +12324,8 @@
}
}
/* global ThrowPropsPlugin */
class Ticks {
get reservedPrefixes() {
return ['decade', 'year', 'month', 'day', 'hour', 'minute', 'second']
@@ -12983,9 +12984,9 @@
this.killTweens();
this.deltas = [];
this.validScroll();
if (typeof ThrowPropsPlugin != 'undefined') {
ThrowPropsPlugin.track(this, 'delta');
}
// if (typeof ThrowPropsPlugin != 'undefined') {
// ThrowPropsPlugin.track(this, 'delta')
// }
}
onMove(event, interaction) {
@@ -13005,11 +13006,11 @@
}
onEnd(event, interaction) {
if (typeof ThrowPropsPlugin != 'undefined') {
let vel = ThrowPropsPlugin.getVelocity(this, 'delta');
ThrowPropsPlugin.untrack(this);
}
// if (typeof ThrowPropsPlugin != 'undefined') {
// let vel = ThrowPropsPlugin.getVelocity(this, 'delta')
// ThrowPropsPlugin.untrack(this)
// }
this.killTweens();
this.redraw();
let delta = 0;
@@ -13022,7 +13023,7 @@
this.autoScroll = true;
let anchor = interaction.current.mean();
this.keepInBounds(delta, anchor);
console.log("onEnd", delta);
for (let key of interaction.ended.keys()) {
if (interaction.isDoubleTap(key)) {
this.onDoubleTap(event, interaction, key);