@@ -14,15 +14,20 @@ Handles all the animation process
14
14
- [ animate(element, action, id, opts)] ( #animate-element-action-id-opts )
15
15
- [ preset(el, args)] ( #preset-el-args )
16
16
- [ isEnabled(element)] ( #isenabled-element ) ⇒ <code >boolean</code >
17
+ - [ removeCustomCssProperties(element)] ( #removecustomcssproperties-element )
18
+ - [ setCssProperty(element, property, value)] ( #setcssproperty-element-property-value )
19
+ - [ updateCssProperties(element, opts)] ( #updatecssproperties-element-opts )
20
+ - [ updateDefaultConfig(opts)] ( #updatedefaultconfig-opts )
21
+ - [ resetDefaultConfig()] ( #resetdefaultconfig )
17
22
18
23
- _ inner_
19
24
25
+ - [ configurations] ( #configurations ) : <code >Object</code >
26
+ - [ configHandler()] ( #confighandler )
27
+ - [ CONFIG] ( #config ) : <code >Object</code >
20
28
- [ DURATION_REGEX] ( #duration-regex ) : <code >RegExp</code >
21
29
- [ CALLBACK_TRACKER] ( #callback-tracker ) : <code >Object</code >
22
30
- [ TARGETS_STACK] ( #targets-stack ) : <code >Object</code >
23
- - [ removeCustomCssProperties(element)] ( #removecustomcssproperties-element )
24
- - [ setCssProperty(element, property, value)] ( #setcssproperty-element-property-value )
25
- - [ updateCssProperties(element, opts)] ( #updatecssproperties-element-opts )
26
31
- [ getTargetSelector(eventTarget)] ( #gettargetselector-eventtarget ) ⇒ <code >string</code >
27
32
- [ getTimeInMs(value)] ( #gettimeinms-value ) ⇒ <code >number</code >
28
33
- [ getTotalAnimTime(element)] ( #gettotalanimtime-element ) ⇒ <code >Object</code >
@@ -42,7 +47,7 @@ Handles all the animation process
42
47
43
48
Initiate the event listener with the animation
44
49
45
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
50
+ ** Kind** : static function of [ <code >animate</code >] ( #animate-js )
46
51
47
52
** See** :
48
53
@@ -59,7 +64,8 @@ Initiate the event listener with the animation
59
64
60
65
Handles all the animation process
61
66
62
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
67
+ ** Kind** : static function of [ <code >animate</code >] ( #animate-js )
68
+
63
69
** See** :
64
70
65
71
- [ globals.VISIBILITY_ANIMS_ID] ( globals.html#visibility-anims-id )
@@ -77,7 +83,7 @@ Handles all the animation process
77
83
Sets the CSS properties customized by the user,
78
84
prior to the begining of the animation
79
85
80
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
86
+ ** Kind** : static function of [ <code >animate</code >] ( #animate-js )
81
87
82
88
| Param | Type | Description |
83
89
| ----- | ------------------------ | ------------------------------------------------------------------ |
@@ -88,18 +94,51 @@ prior to the begining of the animation
88
94
89
95
Verifies if an element is already being animated or not
90
96
91
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
97
+ ** Kind** : static function of [ <code >animate</code >] ( #animate-js )
98
+
92
99
** Returns** : True if the element is not currently being animated
93
100
94
101
| Param | Type | Description |
95
102
| ------- | ------------------------ | ------------------------ |
96
103
| element | <code >HTMLElement</code > | The DOM element to check |
97
104
105
+ ### configurations : <code >Object.< ; string, any> ; </code >
106
+
107
+ Contains the default value for each custom option.
108
+ Those values can be overwritten by the user by calling jsCssAnimations.config()
109
+ and passing new default values for all the animations.
110
+
111
+ ** Kind** : inner constant of [ <code >animate</code >] ( #animate-js )
112
+
113
+ ** See** : [ js-css-animations.config()] ( js-css-animations.html#config-opts )
114
+
115
+ ### configHandler
116
+
117
+ ProxyHandler passed to the _ CONFIG_ object to ensure that
118
+ if an option is not customized by the user, the default value set
119
+ in _ configurations.default_ will be returned instead.
120
+
121
+ ** Kind** : inner constant of [ <code >animate</code >] ( #animate-js )
122
+
123
+ ** See**
124
+
125
+ - [ CONFIG] ( #config )
126
+ - [ configurations] ( #configurations )
127
+
128
+ ### CONFIG : <code >Object.< ; string, any> ; </code >
129
+
130
+ Object that handles configurations, either customized by the user
131
+ or default values defined in _ configurations.default_ object
132
+
133
+ ** Kind** : inner constant of [ <code >animate</code >] ( #animate-js )
134
+
135
+ ** See** : [ configurations] ( #configurations )
136
+
98
137
## DURATION_REGEX : <code >RegExp</code >
99
138
100
139
Matches duration or delay CSS properties values
101
140
102
- ** Kind** : inner constant of [ <code >animate</code >] ( #animate )
141
+ ** Kind** : inner constant of [ <code >animate</code >] ( #animate-js )
103
142
104
143
## CALLBACK_TRACKER : <code >Object</code >
105
144
@@ -109,7 +148,7 @@ multiple times if multiple elements are being animated by a single trigger.
109
148
When an element triggers an animation, no matter how many elements are being animated,
110
149
the start() and complete() callbacks should each be executed only once.
111
150
112
- ** Kind** : inner constant of [ <code >animate</code >] ( #animate )
151
+ ** Kind** : inner constant of [ <code >animate</code >] ( #animate-js )
113
152
114
153
- [ CALLBACK_TRACKER] ( #callback-tracker ) : <code >Object</code >
115
154
- [ .init(trigger)] ( #callback-tracker-init-trigger )
@@ -142,18 +181,18 @@ Keeps track of all the targets being animated to ensure that the callback tracke
142
181
will be removed only when all the targets have been animated. Also ensures that
143
182
all targets will be re-enabled only when all targets have already been animated.
144
183
145
- ** Kind** : inner constant of [ <code >animate</code >] ( #animate )
184
+ ** Kind** : inner constant of [ <code >animate</code >] ( #animate-js )
146
185
147
- - [ TARGETS_STACK] ( #TARGETS_STACK ) : <code >Object</code >
148
- - [ .add(elem, trigger)] ( #TARGETS_STACK. add )
149
- - [ .remove(trigger)] ( #TARGETS_STACK. remove )
150
- - [ .get(trigger)] ( #TARGETS_STACK. get ) ⇒ <code >Array.< ; HTMLElement> ; </code >
186
+ - [ TARGETS_STACK] ( #targets-stack ) : <code >Object</code >
187
+ - [ .add(elem, trigger)] ( #targets-stack- add-elem-trigger )
188
+ - [ .remove(trigger)] ( #targets-stack- remove-trigger )
189
+ - [ .get(trigger)] ( #targets-stack- get-trigger ) ⇒ <code >Array.< ; HTMLElement> ; </code >
151
190
152
191
### TARGETS_STACK.add(elem, trigger)
153
192
154
193
Adds an element to the stack
155
194
156
- ** Kind** : static function of [ <code >TARGETS_STACK</code >] ( #TARGETS_STACK )
195
+ ** Kind** : static function of [ <code >TARGETS_STACK</code >] ( #targets-stack )
157
196
158
197
| Param | Type | Description |
159
198
| ------- | ------------------------ | --------------------------------------------------------- |
@@ -164,7 +203,7 @@ Adds an element to the stack
164
203
165
204
Removes from the stack all the elements animated by the same trigger button
166
205
167
- ** Kind** : static function of [ <code >TARGETS_STACK</code >] ( #TARGETS_STACK )
206
+ ** Kind** : static function of [ <code >TARGETS_STACK</code >] ( #targets-stack )
168
207
169
208
| Param | Type | Description |
170
209
| ------- | ------------------- | --------------------------------------------------------- |
@@ -174,18 +213,41 @@ Removes from the stack all the elements animated by the same trigger button
174
213
175
214
Gets all elements included in the stack for a given trigger button
176
215
177
- ** Kind** : static function of [ <code >TARGETS_STACK</code >] ( #TARGETS_STACK )
216
+ ** Kind** : static function of [ <code >TARGETS_STACK</code >] ( #targets-stack )
217
+
178
218
** Returns** : An array of elements that have been animated by the same trigger button
179
219
180
220
| Param | Type | Description |
181
221
| ------- | ------------------- | --------------------------------------------------------- |
182
222
| trigger | <code >string</code > | CSS selector for the element that triggered the animation |
183
223
224
+ ### updateDefaultConfig(opts)
225
+
226
+ Customize the default animations configurations by overwriting
227
+ the _ CONFIG_ values
228
+
229
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
230
+
231
+ ** See** : [ CONFIG] ( #config )
232
+
233
+ | Param | Type | Description |
234
+ | ----- | ------------------- | -------------------------------------- |
235
+ | opts | <code >Object</code > | All the options customized by the user |
236
+
237
+ ### resetDefaultConfig()
238
+
239
+ Reset the configurations to its default values
240
+ by removing from _ CONFIG_ all options customized by the user
241
+
242
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
243
+
244
+ ** See** : [ CONFIG] ( #config )
245
+
184
246
## removeCustomCssProperties(element)
185
247
186
248
Removes the CSS properties customized by the user
187
249
188
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
250
+ ** Kind** : static function of [ <code >animate</code >] ( #animate-js )
189
251
190
252
| Param | Type | Description |
191
253
| ------- | ------------------------ | ---------------------------------------------- |
@@ -195,7 +257,7 @@ Removes the CSS properties customized by the user
195
257
196
258
Sets an inline CSS property
197
259
198
- ** Kind** : static function of [ <code >animate</code >] ( #animate )
260
+ ** Kind** : static function of [ <code >animate</code >] ( #animate-js )
199
261
200
262
** See** : [ globals.PROPERTY_NAMES] ( globals.html#property-names )
201
263
@@ -209,7 +271,7 @@ Sets an inline CSS property
209
271
210
272
Sets the CSS properties customized by the user in the animation function's options
211
273
212
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
274
+ ** Kind** : static function of [ <code >animate</code >] ( #animate-js )
213
275
214
276
| Param | Type | Description |
215
277
| ------- | ------------------------------------------ | --------------------------------------------------------------------- |
@@ -225,7 +287,8 @@ will bubbles up untill the attribute is found.
225
287
If no attribute is found, an empty string is returned and so
226
288
no element will be selected to be animated
227
289
228
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
290
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
291
+
229
292
** Returns** : The CSS selector for the animation target(s) or an empty string
230
293
231
294
| Param | Type | Description |
@@ -236,7 +299,8 @@ no element will be selected to be animated
236
299
237
300
Removes the unit from the duration or delay and returns the value in milliseconds
238
301
239
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
302
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
303
+
240
304
** Returns** : The duration or delay in milliseconds
241
305
242
306
| Param | Type | Description |
@@ -247,7 +311,8 @@ Removes the unit from the duration or delay and returns the value in millisecond
247
311
248
312
Returns an object with the duration and delay time in milliseconds
249
313
250
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
314
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
315
+
251
316
** Returns** : Both the duration and delay, in milliseconds
252
317
253
318
| Param | Type | Description |
@@ -258,7 +323,8 @@ Returns an object with the duration and delay time in milliseconds
258
323
259
324
Returns true if the animation type is 'visibility'
260
325
261
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
326
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
327
+
262
328
** Returns** : True if animation type is 'visibility'. False otherwise.
263
329
264
330
| Param | Type | Description |
@@ -269,7 +335,8 @@ Returns true if the animation type is 'visibility'
269
335
270
336
Returns true if the animation type is 'motion'
271
337
272
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
338
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
339
+
273
340
** Returns** : True if animation type is 'motion'. False otherwise.
274
341
275
342
| Param | Type | Description |
@@ -280,7 +347,7 @@ Returns true if the animation type is 'motion'
280
347
281
348
Removes the current motion animation CSS class from the element
282
349
283
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
350
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
284
351
285
352
| Param | Type | Description |
286
353
| ------- | ------------------------ | ------------------------------ |
@@ -291,7 +358,7 @@ Removes the current motion animation CSS class from the element
291
358
Sets an attribute to indicate that the element is currently being animated
292
359
and so can not perform any other animations
293
360
294
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
361
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
295
362
296
363
| Param | Type | Description |
297
364
| ------- | ------------------------ | ------------------------------ |
@@ -301,7 +368,7 @@ and so can not perform any other animations
301
368
302
369
Removes the attribute that indicates that an element is currently being animated
303
370
304
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
371
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
305
372
306
373
| Param | Type |
307
374
| ------- | ------------------------ |
@@ -311,7 +378,8 @@ Removes the attribute that indicates that an element is currently being animated
311
378
312
379
Verifies if an element has defined an iteration CSS property
313
380
314
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
381
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
382
+
315
383
** Returns** : True if the element has an iteration CSS property set, False otherwise
316
384
317
385
| Param | Type |
@@ -324,7 +392,7 @@ Sets the parent element dimensions, if needed.
324
392
325
393
Removes the collapsed or hidden class from the element, when necessary
326
394
327
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
395
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
328
396
329
397
| Param | Type | Description |
330
398
| ------- | ------------------------ | ------------------------------ |
@@ -336,7 +404,7 @@ Removes the collapsed or hidden class from the element, when necessary
336
404
Adds the hidden or collapsed class, when necessary.
337
405
Finalize parent element's resize operations, if needed.
338
406
339
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
407
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
340
408
341
409
| Param | Type | Description |
342
410
| ------- | ------------------------ | ------------------------------ |
@@ -348,7 +416,7 @@ Finalize parent element's resize operations, if needed.
348
416
Executes a given callback, checking, when necessary, if the callback was already
349
417
executed by another element being animated by the same trigger button
350
418
351
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
419
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
352
420
353
421
| Param | Type | Description |
354
422
| ------- | --------------------- | ------------------------------------------------------------ |
@@ -360,7 +428,8 @@ executed by another element being animated by the same trigger button
360
428
361
429
Checks which animation CSS class is set to determine wich action to perform next
362
430
363
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
431
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
432
+
364
433
** Returns** : 'show' or 'hide' or 'move' or 'moveBack'
365
434
366
435
| Param | Type | Description |
@@ -372,8 +441,10 @@ Checks which animation CSS class is set to determine wich action to perform next
372
441
373
442
Generates the handler function to be passed to the event listener
374
443
375
- ** Kind** : inner method of [ <code >animate</code >] ( #animate )
376
- ** Returns** : A function to be passed to the addEventListener() as a handler
444
+ ** Kind** : inner method of [ <code >animate</code >] ( #animate-js )
445
+
446
+ ** Returns** : A function to be passed to the addEventListener() as a handler
447
+
377
448
** See** :
378
449
379
450
- [ globals.VISIBILITY_ANIMS_ID] ( globals.html#visibility-anims-id )
0 commit comments