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

Wrong timeline value when 2 items stacked in same timeline #37

Open
JavierTous opened this issue Apr 16, 2021 · 1 comment
Open

Wrong timeline value when 2 items stacked in same timeline #37

JavierTous opened this issue Apr 16, 2021 · 1 comment

Comments

@JavierTous
Copy link

You can check this problem on the demo too.

If you click (without draggin), the second item (stacked) on the first timeline. The return from the on Click is:

{"start":"11:00","end":"14:00","text":"Text Area","timeline":"1","data":{},"startTime":39600,"endTime":50400}

note that timeline value is 1, should be 0. Same happens when you resize the element.

If you move the element, timeline is recalculated and it works. I think on the initial load of data, something is wrong.

@JavierTous
Copy link
Author

JavierTous commented Apr 16, 2021

I may have fixed it by changing in line 668
data.timeline = i; to data.timeline = timeline

so the scheduledata gets the timeline from the current row instead of the index of schedules in the row.
I don't know if this was intentional. Hopefully somebody can check and it's helpful.

Edit:: Incidentally, this solves another small issue. If you drag a stacked item to another timeline, the row doesnt's resize. Happens in the demo too. By changing this, size of row gets recalculated.

cdaecke added a commit to cdaecke/jquery.schedule that referenced this issue Feb 2, 2022
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