Skip to content

Commit

Permalink
Merge pull request #3 from nikos912000/fix-scrolling
Browse files Browse the repository at this point in the history
fix: increase animation duration to fix scrolling
  • Loading branch information
nikos912000 authored Dec 15, 2024
2 parents 456fe7b + 2f63694 commit 5cf6714
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ def show(index):
body.animate(ltk.to_js({ "scrollTop": height - 800 }), 1500, 'swing', lambda:
body.animate(ltk.to_js({ "scrollTop": 0 }), 300, 'swing')
)
# ltk.find("#main").animate(ltk.to_js({ "left": 0 }))
return
x = ltk.parse_float(item.css("left"))
y = ltk.parse_float(item.css("top"))
Expand All @@ -390,11 +389,11 @@ def show(index):
ltk.find("#main").animate(
ltk.to_js({
"left": -x + width * 3 /4,
}), 500,
}), 1000,
lambda: ltk.find("#main").animate(
ltk.to_js({
"left": 0,
}), 500
}), 1000
)
)

Expand Down

0 comments on commit 5cf6714

Please sign in to comment.