@@ -8,11 +8,18 @@ title: animate
8
8
9
9
Handles all the animation process
10
10
11
- - _ Constants_
11
+ - _ export_
12
+
13
+ - [ init(animationId, opts, eventType)] ( #init-animationid-opts-eventtype )
14
+ - [ animate(element, action, id, opts)] ( #animate-element-action-id-opts )
15
+ - [ preset(el, args)] ( #preset-el-args )
16
+ - [ isEnabled(element)] ( #isenabled-element ) ⇒ <code >boolean</code >
17
+
18
+ - _ inner_
19
+
12
20
- [ DURATION_REGEX] ( #duration-regex ) : <code >RegExp</code >
13
21
- [ CALLBACK_TRACKER] ( #callback-tracker ) : <code >Object</code >
14
22
- [ TARGETS_STACK] ( #targets-stack ) : <code >Object</code >
15
- - _ Functions_
16
23
- [ removeCustomCssProperties(element)] ( #removecustomcssproperties-element )
17
24
- [ setCssProperty(element, property, value)] ( #setcssproperty-element-property-value )
18
25
- [ updateCssProperties(element, opts)] ( #updatecssproperties-element-opts )
@@ -24,16 +31,69 @@ Handles all the animation process
24
31
- [ removeMotionCssClass(element)] ( #removemotioncssclass-element )
25
32
- [ disable(element)] ( #disable-element )
26
33
- [ enable(element)] ( #enable-element )
27
- - [ isEnabled(element)] ( #isenabled-element ) ⇒ <code >boolean</code >
28
34
- [ hasIterationProp(element)] ( #hasiterationprop-element ) ⇒ <code >boolean</code >
29
35
- [ handleVisibilityToggle(element, args)] ( #handlevisibilitytoggle-element-args )
30
36
- [ endVisibilityToggle(element, opts)] ( #endvisibilitytoggle-element-opts )
31
37
- [ initcallback(trigger, fn, type)] ( #initcallback-trigger-fn-type )
32
- - [ animate(element, action, id, opts)] ( #animate-element-action-id-opts )
33
38
- [ getAction(element, animType)] ( #getaction-element-animtype ) ⇒ <code >string</code > \| <code >null</code >
34
- - [ preset(el, args)] ( #preset-el-args )
35
39
- [ eventHandler(el, animationId, opts)] ( #eventhandler-el-animationid-opts ) ⇒ <code >function</code >
36
- - [ init(animationId, opts, eventType)] ( #init-animationid-opts-eventtype )
40
+
41
+ ## init(animationId, opts, eventType)
42
+
43
+ Initiate the event listener with the animation
44
+
45
+ ** Kind** : static function of [ <code >animate</code >] ( #animate )
46
+
47
+ ** See** :
48
+
49
+ - [ globals.VISIBILITY_ANIMS_ID] ( globals.html#visibility-anims-id )
50
+ - [ globals.MOTION_ANIMS_ID] ( globals.html#motion-anims-id )
51
+
52
+ | Param | Type | Default | Description |
53
+ | ----------- | ------------------- | ------------------------------ | ---------------------------------------------- |
54
+ | animationId | <code >number</code > | | The ID of the animation in \*\_ ANIMS_ID object |
55
+ | opts | <code >Object</code > | | All options passed by the user |
56
+ | eventType | <code >string</code > | <code >" ; click" ; </code > | The event to attach the animation to |
57
+
58
+ ## animate(element, action, id, opts)
59
+
60
+ Handles all the animation process
61
+
62
+ ** Kind** : static function of [ <code >animate</code >] ( #animate )
63
+ ** See** :
64
+
65
+ - [ globals.VISIBILITY_ANIMS_ID] ( globals.html#visibility-anims-id )
66
+ - [ globals.MOTION_ANIMS_ID] ( globals.html#motion-anims-id )
67
+
68
+ | Param | Type | Description |
69
+ | ------- | --------------------------------------- | ---------------------------------------------- |
70
+ | element | <code >HTMLElement</code > | The DOM element to animate |
71
+ | action | <code >string</code > | 'show', 'hide', or 'move' |
72
+ | id | <code >number</code > | ID of an animation in the \*\_ ANIMS_ID objects |
73
+ | opts | <code >Object.< ; string, any> ; </code > | All the options passed by the user |
74
+
75
+ ## preset(el, args)
76
+
77
+ Sets the CSS properties customized by the user,
78
+ prior to the begining of the animation
79
+
80
+ ** Kind** : static function of [ <code >animate</code >] ( #animate )
81
+
82
+ | Param | Type | Description |
83
+ | ----- | ------------------------ | ------------------------------------------------------------------ |
84
+ | el | <code >HTMLElement</code > | The DOM element being animated |
85
+ | args | <code >Object</code > | The animation's ID and type and all the options passed by the user |
86
+
87
+ ## isEnabled(element) ⇒ <code >boolean</code >
88
+
89
+ Verifies if an element is already being animated or not
90
+
91
+ ** Kind** : static function of [ <code >animate</code >] ( #animate )
92
+ ** Returns** : True if the element is not currently being animated
93
+
94
+ | Param | Type | Description |
95
+ | ------- | ------------------------ | ------------------------ |
96
+ | element | <code >HTMLElement</code > | The DOM element to check |
37
97
38
98
## DURATION_REGEX : <code >RegExp</code >
39
99
@@ -137,7 +197,7 @@ Sets an inline CSS property
137
197
138
198
** Kind** : static function of [ <code >animate</code >] ( #animate )
139
199
140
- ** See** : [ globals.PROPERTY_NAMES] ( globals.html#globals- property-names )
200
+ ** See** : [ globals.PROPERTY_NAMES] ( globals.html#property-names )
141
201
142
202
| Param | Type | Description |
143
203
| -------- | ------------------------ | ----------------------------------------------- |
@@ -247,17 +307,6 @@ Removes the attribute that indicates that an element is currently being animated
247
307
| ------- | ------------------------ |
248
308
| element | <code >HTMLElement</code > |
249
309
250
- ## isEnabled(element) ⇒ <code >boolean</code >
251
-
252
- Verifies if an element is already being animated or not
253
-
254
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
255
- ** Returns** : True if the element is not currently being animated
256
-
257
- | Param | Type | Description |
258
- | ------- | ------------------------ | ------------------------ |
259
- | element | <code >HTMLElement</code > | The DOM element to check |
260
-
261
310
## hasIterationProp(element) ⇒ <code >boolean</code >
262
311
263
312
Verifies if an element has defined an iteration CSS property
@@ -307,23 +356,6 @@ executed by another element being animated by the same trigger button
307
356
| fn | <code >function</code > | The callback to execute |
308
357
| type | <code >string</code > | Either 'start' or 'complete' |
309
358
310
- ## animate(element, action, id, opts)
311
-
312
- Handles all the animation process
313
-
314
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
315
- ** See** :
316
-
317
- - [ globals.VISIBILITY_ANIMS_ID] ( globals.html#globals-visibility-anims-id )
318
- - [ globals.MOTION_ANIMS_ID] ( globals.html#globals-motion-anims-id )
319
-
320
- | Param | Type | Description |
321
- | ------- | --------------------------------------- | ---------------------------------------------- |
322
- | element | <code >HTMLElement</code > | The DOM element to animate |
323
- | action | <code >string</code > | 'show', 'hide', or 'move' |
324
- | id | <code >number</code > | ID of an animation in the \*\_ ANIMS_ID objects |
325
- | opts | <code >Object.< ; string, any> ; </code > | All the options passed by the user |
326
-
327
359
## getAction(element, animType) ⇒ <code >string</code > \| <code >null</code >
328
360
329
361
Checks which animation CSS class is set to determine wich action to perform next
@@ -336,18 +368,6 @@ Checks which animation CSS class is set to determine wich action to perform next
336
368
| element | <code >HTMLElement</code > | The DOM element being animated |
337
369
| animType | <code >\* </code > | Either 'motion' or 'visibility' |
338
370
339
- ## preset(el, args)
340
-
341
- Sets the CSS properties customized by the user,
342
- prior to the begining of the animation
343
-
344
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
345
-
346
- | Param | Type | Description |
347
- | ----- | ------------------------ | ------------------------------------------------------------------ |
348
- | el | <code >HTMLElement</code > | The DOM element being animated |
349
- | args | <code >Object</code > | The animation's ID and type and all the options passed by the user |
350
-
351
371
## eventHandler(el, animationId, opts) ⇒ <code >function</code >
352
372
353
373
Generates the handler function to be passed to the event listener
@@ -356,27 +376,11 @@ Generates the handler function to be passed to the event listener
356
376
** Returns** : A function to be passed to the addEventListener() as a handler
357
377
** See** :
358
378
359
- - [ globals.VISIBILITY_ANIMS_ID] ( globals.html#globals- visibility-anims-id )
360
- - [ globals.MOTION_ANIMS_ID] ( globals.html#globals- motion-anims-id )
379
+ - [ globals.VISIBILITY_ANIMS_ID] ( globals.html#visibility-anims-id )
380
+ - [ globals.MOTION_ANIMS_ID] ( globals.html#motion-anims-id )
361
381
362
382
| Param | Type | Description |
363
383
| ----------- | ------------------------ | ------------------------------------------- |
364
384
| el | <code >HTMLElement</code > | The DOM element being animated |
365
385
| animationId | <code >number</code > | The ID of the animation in the \*\_ ANIMS_ID |
366
386
| opts | <code >Object</code > | The options passed by the user |
367
-
368
- ## init(animationId, opts, eventType)
369
-
370
- Initiate the event listener with the animation
371
-
372
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
373
- ** See** :
374
-
375
- - [ module: globals .VISIBILITY_ANIMS_ID] ( module:globals.VISIBILITY_ANIMS_ID )
376
- - [ module: globals .MOTION_ANIMS_ID] ( module:globals.MOTION_ANIMS_ID )
377
-
378
- | Param | Type | Default | Description |
379
- | ----------- | ------------------- | ------------------------------ | ---------------------------------------------- |
380
- | animationId | <code >number</code > | | The ID of the animation in \*\_ ANIMS_ID object |
381
- | opts | <code >Object</code > | | All options passed by the user |
382
- | eventType | <code >string</code > | <code >" ; click" ; </code > | The event to attach the animation to |
0 commit comments