Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setWindow() is not working with animation if timeline area was swiped before #1705

Open
dsentker opened this issue Oct 30, 2023 · 0 comments

Comments

@dsentker
Copy link

dsentker commented Oct 30, 2023

My timeline has several rows and exceeds the window height. The timeline window can be moved up- and downwards to see all items.

I experienced the issue that all setRange()-related functions (such as zoomIn(), zoomOut()) are not working when this task is animated (as set per default). When deactivating animation, everything worked fine.

I come to the conclusion that the bug appears when the user moves the window vertically before using the zoomIn() function. In that case, timeline.range.props.touch.dragging is internally set to true. That causes the animation to stop, as seen here in the source code:

var next = function next() {
if (!me.props.touch.dragging) {
	var now = _Date$now();
	var time = now - initTime;
	var ease = easingFunction(time / duration);

Due to the "swipe" motion on the device, the "drag" process was not completed. So timeline gets stuck and it is not possible to perform the action.

Since I'm not very good in JavaScript, I don't know exactly where to start here. An approach would be analogous to my workaround:

function zoomOut() {
    timeline.range.props.touch.dragging = false;
    timeline.zoomOut(1);
}
@dsentker dsentker changed the title setRange() is not working if timeline area was swiped before setWindow() is not working with animation if timeline area was swiped before Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant