@@ -4,100 +4,93 @@ title: resize-parent
4
4
5
5
# resize-parent
6
6
7
- < a name = " module_resize -parent" ></ a >
7
+ ## resize -parent.js
8
8
9
- ## resize- parent
10
- Handles parent element's resizing to perform width/height smooth transitions when child element is being animated
9
+ Handles parent element's resizing to perform width/height smooth transitions
10
+ when child element is being animated
11
11
12
+ - [ resize-parent] ( #resize-parent )
13
+ - [ getRootCssProperty(property)] ( #getrootcssproperty-property ) ⇒ <code >string</code >
14
+ - [ setParentCssProperties(element)] ( #setparentcssproperties-element )
15
+ - [ getDimension(wTransit, hTransit)] ( #getdimension-wtransit-htransit ) ⇒ <code >string</code > \| <code >undefined</code >
16
+ - [ setOverflowHidden(el)] ( #setoverflowhidden-el )
17
+ - [ removeOverflowHidden(el)] ( #removeoverflowhidden-el )
18
+ - [ initParentResize(args)] ( #initparentresize-args ) ⇒ <code >Object</code >
19
+ - [ endParentResize(element, opts)] ( #endparentresize-element-opts )
12
20
13
- * [ resize-parent] ( #module_resize-parent )
14
- * [ ~ getRootCssProperty(property)] ( #module_resize-parent..getRootCssProperty ) ⇒
15
- * [ ~ setParentCssProperties(element)] ( #module_resize-parent..setParentCssProperties )
16
- * [ ~ getDimension(wTransit, hTransit)] ( #module_resize-parent..getDimension ) ⇒
17
- * [ ~ setOverflowHidden(el)] ( #module_resize-parent..setOverflowHidden )
18
- * [ ~ removeOverflowHidden(el)] ( #module_resize-parent..removeOverflowHidden )
19
- * [ ~ initParentResize(args)] ( #module_resize-parent..initParentResize ) ⇒
20
- * [ ~ endParentResize(element, opts)] ( #module_resize-parent..endParentResize )
21
+ ### getRootCssProperty(property) ⇒ <code >string</code >
21
22
22
- <a name =" module_resize-parent..getRootCssProperty " ></a >
23
-
24
- ### resize-parent~ getRootCssProperty(property) ⇒
25
23
Gets the default value of a CSS property defined in js-css-animations.css
26
24
27
- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
28
- ** Returns** : The default js-css-animation property value
25
+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
26
+ ** Returns** : The default js-css-animation property value
29
27
30
- | Param | Type | Description |
31
- | --- | --- | --- |
28
+ | Param | Type | Description |
29
+ | -------- | ------------------- | ---------------------------------------------------- --- |
32
30
| property | <code >string</code > | PROPERTY_NAMES key corresponding to a CSS property name |
33
31
34
- < a name = " module_resize-parent.. setParentCssProperties" ></ a >
32
+ ### setParentCssProperties(element)
35
33
36
- ### resize-parent~ setParentCssProperties(element)
37
- Sets the same CSS variables (customized by the options in the animation function) in the parent element, so the parent's dimensions transitions will have the same custom properties of the child element's animations
34
+ Sets the same CSS variables (customized by the options in the animation function)
35
+ in the parent element, so the parent's dimensions transitions will have
36
+ the same custom properties of the child element's animations
38
37
39
- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
38
+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
40
39
41
- | Param | Type | Description |
42
- | --- | --- | --- |
40
+ | Param | Type | Description |
41
+ | ------- | ------------------------ | --------------------------- --- |
43
42
| element | <code >HTMLElement</code > | The DOM element being animated |
44
43
45
- < a name = " module_resize-parent.. getDimension" ></ a >
44
+ ### getDimension(wTransit, hTransit) ⇒ < code >string</ code > \| < code >undefined</ code >
46
45
47
- ### resize-parent~ getDimension(wTransit, hTransit) ⇒
48
46
Returns a string with the dimension to transition, or 'all' for both dimensions, or undefined if neither width nor height should be transitioned
49
47
50
- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
51
- ** Returns** : undefined if both parameters are false, 'all' if both are true and 'width' or 'height' if only wTransit or hTransit is true, respectively
48
+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
49
+ ** Returns** : undefined if both parameters are false, 'all' if both are true and 'width' or 'height' if only wTransit or hTransit is true, respectively
52
50
53
- | Param | Type | Description |
54
- | --- | --- | --- |
55
- | wTransit | <code >boolean</code > | Indicates if parent element should have width transition |
51
+ | Param | Type | Description |
52
+ | -------- | -------------------- | ------------------------------------------------------ --- |
53
+ | wTransit | <code >boolean</code > | Indicates if parent element should have width transition |
56
54
| hTransit | <code >boolean</code > | Indicates if parent element should have height transition |
57
55
58
- < a name = " module_resize-parent.. setOverflowHidden" ></ a >
56
+ ### setOverflowHidden(el)
59
57
60
- ### resize-parent~ setOverflowHidden(el)
61
58
Adds a CSS class which will set the overflow property to 'clip' (or 'hidden')
62
59
63
- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
60
+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
64
61
65
- | Param | Type | Description |
66
- | --- | --- | --- |
67
- | el | <code >HTMLElement</code > | The DOM element which will receive the CSS class |
62
+ | Param | Type | Description |
63
+ | ----- | ------------------------ | --------------------------------------------- --- |
64
+ | el | <code >HTMLElement</code > | The DOM element which will receive the CSS class |
68
65
69
- < a name = " module_resize-parent.. removeOverflowHidden" ></ a >
66
+ ### removeOverflowHidden(el)
70
67
71
- ### resize-parent~ removeOverflowHidden(el)
72
68
Removes the CSS class which sets the overflow property to 'clip' (or 'hidden')
73
69
74
- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
70
+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
75
71
76
- | Param | Type | Description |
77
- | --- | --- | --- |
78
- | el | <code >HTMLElement</code > | The DOM element with the CSS class to remove |
72
+ | Param | Type | Description |
73
+ | ----- | ------------------------ | ----------------------------------------- --- |
74
+ | el | <code >HTMLElement</code > | The DOM element with the CSS class to remove |
79
75
80
- < a name = " module_resize-parent.. initParentResize" ></ a >
76
+ ### initParentResize(args) ⇒ < code >Object</ code >
81
77
82
- ### resize-parent~ initParentResize(args) ⇒
83
78
Handles parent element width/height transitions during child element's animation
84
79
85
- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
86
- ** Returns** : An object with the dimension(s) to transition and the parent element's measurements before and after the child element's animation is performed
80
+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
81
+ ** Returns** : An object with the dimension(s) to transition and the parent element's measurements before and after the child element's animation is performed
87
82
88
- | Param | Type | Description |
89
- | --- | --- | --- |
90
- | args | <code >Object</code > | Containing all the information needed to initiate parent's dimensions transitions |
83
+ | Param | Type | Description |
84
+ | ----- | ------------------- | ------------------------------------------------------------------------------ --- |
85
+ | args | <code >Object</code > | Containing all the information needed to initiate parent's dimensions transitions |
91
86
92
- < a name = " module_resize-parent.. endParentResize" ></ a >
87
+ ### endParentResize(element, opts)
93
88
94
- ### resize-parent~ endParentResize(element, opts)
95
89
Removes all CSS properties and classes added to the parent element to handle the dimensions transitions during the animation
96
90
97
- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize-parent )
98
-
99
- | Param | Type | Description |
100
- | --- | --- | --- |
101
- | element | <code >HTMLElement</code > | The DOM element being animated |
102
- | opts | <code >Object</code > | Indicates which dimensions were transitioned |
91
+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize-parent )
103
92
93
+ | Param | Type | Description |
94
+ | ------- | ------------------------ | -------------------------------------------- |
95
+ | element | <code >HTMLElement</code > | The DOM element being animated |
96
+ | opts | <code >Object</code > | Indicates which dimensions were transitioned |
0 commit comments