fix various docs (#7672)

* fix kivy/effects/*.py docs
* add 'kivy.clock.triggered' to the doc
This commit is contained in:
水戸う納豆齋(Nattōsai Mitō) 2021-10-30 21:12:27 +09:00 committed by GitHub
parent 8ae4378e85
commit a7a0310219
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View File

@ -449,7 +449,7 @@ See :mod:`~kivy.app` for example usage.
__all__ = (
'Clock', 'ClockNotRunningError', 'ClockEvent', 'FreeClockEvent',
'CyClockBase', 'CyClockBaseFree',
'CyClockBase', 'CyClockBaseFree', 'triggered',
'ClockBaseBehavior', 'ClockBaseInterruptBehavior',
'ClockBaseInterruptFreeBehavior', 'ClockBase', 'ClockBaseInterrupt',
'ClockBaseFreeInterruptAll', 'ClockBaseFreeInterruptOnly', 'mainthread')

View File

@ -55,6 +55,7 @@ class DampedScrollEffect(ScrollEffect):
:attr:`round_value` is a :class:`~kivy.properties.BooleanProperty` and
defaults to True.
'''
def update_velocity(self, dt):
if abs(self.velocity) <= self.min_velocity and self.overscroll == 0:
self.velocity = 0

View File

@ -59,21 +59,21 @@ class KineticEffect(EventDispatcher):
friction = NumericProperty(0.05)
'''Friction to apply on the velocity
:attr:`velocity` is a :class:`~kivy.properties.NumericProperty` and
:attr:`friction` is a :class:`~kivy.properties.NumericProperty` and
defaults to 0.05.
'''
value = NumericProperty(0)
'''Value (during the movement and computed) of the effect.
:attr:`velocity` is a :class:`~kivy.properties.NumericProperty` and
:attr:`value` is a :class:`~kivy.properties.NumericProperty` and
defaults to 0.
'''
is_manual = BooleanProperty(False)
'''Indicate if a movement is in progress (True) or not (False).
:attr:`velocity` is a :class:`~kivy.properties.BooleanProperty` and
:attr:`is_manual` is a :class:`~kivy.properties.BooleanProperty` and
defaults to False.
'''
@ -84,6 +84,7 @@ class KineticEffect(EventDispatcher):
:attr:`max_history` is a :class:`~kivy.properties.NumericProperty` and
defaults to 5.
'''
min_distance = NumericProperty(.1)
'''The minimal distance for a movement to have nonzero velocity.

View File

@ -31,7 +31,7 @@ class ScrollEffect(KineticEffect):
drag_threshold = NumericProperty('20sp')
'''Minimum distance to travel before the movement is considered as a drag.
:attr:`velocity` is a :class:`~kivy.properties.NumericProperty` and
:attr:`drag_threshold` is a :class:`~kivy.properties.NumericProperty` and
defaults to 20sp.
'''