forked from plotly/plotly.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
animation.py
54 lines (50 loc) · 1.58 KB
/
animation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from _plotly_utils.basevalidators import EnumeratedValidator, NumberValidator
class EasingValidator(EnumeratedValidator):
def __init__(self, plotly_name="easing", parent_name="batch_animate", **_):
super(EasingValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
values=[
"linear",
"quad",
"cubic",
"sin",
"exp",
"circle",
"elastic",
"back",
"bounce",
"linear-in",
"quad-in",
"cubic-in",
"sin-in",
"exp-in",
"circle-in",
"elastic-in",
"back-in",
"bounce-in",
"linear-out",
"quad-out",
"cubic-out",
"sin-out",
"exp-out",
"circle-out",
"elastic-out",
"back-out",
"bounce-out",
"linear-in-out",
"quad-in-out",
"cubic-in-out",
"sin-in-out",
"exp-in-out",
"circle-in-out",
"elastic-in-out",
"back-in-out",
"bounce-in-out",
],
)
class DurationValidator(NumberValidator):
def __init__(self, plotly_name="duration"):
super(DurationValidator, self).__init__(
plotly_name=plotly_name, parent_name="batch_animate", min=0
)