Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
20b61746
Commit
20b61746
authored
1 year ago
by
dos
Committed by
ave
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
py,st3m: ScrollController: Add set_position and scroll_to methods
parent
663bbd5a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_payload/st3m/ui/interactions.py
+12
-0
12 additions, 0 deletions
python_payload/st3m/ui/interactions.py
with
12 additions
and
0 deletions
python_payload/st3m/ui/interactions.py
+
12
−
0
View file @
20b61746
...
@@ -50,6 +50,18 @@ class ScrollController(st3m.Responder):
...
@@ -50,6 +50,18 @@ class ScrollController(st3m.Responder):
count
=
0
count
=
0
self
.
_nitems
=
count
self
.
_nitems
=
count
def
set_position
(
self
,
position
:
int
)
->
None
:
"""
Immediately set a position without animating the transition.
"""
self
.
_target_position
=
self
.
_current_position
=
position
def
scroll_to
(
self
,
position
:
int
)
->
None
:
"""
Scroll to specified position.
"""
self
.
_target_position
=
position
def
scroll_left
(
self
)
->
None
:
def
scroll_left
(
self
)
->
None
:
"""
"""
Call when the user wants to scroll left by discrete action (eg. button
Call when the user wants to scroll left by discrete action (eg. button
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment