@@ -4,100 +4,93 @@ title: resize-parent
44
55# resize-parent
66
7- < a name = " module_resize -parent" ></ a >
7+ ## resize -parent.js
88
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
1111
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 )
1220
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 >
2122
22- <a name =" module_resize-parent..getRootCssProperty " ></a >
23-
24- ### resize-parent~ getRootCssProperty(property) ⇒
2523Gets the default value of a CSS property defined in js-css-animations.css
2624
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
2927
30- | Param | Type | Description |
31- | --- | --- | --- |
28+ | Param | Type | Description |
29+ | -------- | ------------------- | ---------------------------------------------------- --- |
3230| property | <code >string</code > | PROPERTY_NAMES key corresponding to a CSS property name |
3331
34- < a name = " module_resize-parent.. setParentCssProperties" ></ a >
32+ ### setParentCssProperties(element)
3533
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
3837
39- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
38+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
4039
41- | Param | Type | Description |
42- | --- | --- | --- |
40+ | Param | Type | Description |
41+ | ------- | ------------------------ | --------------------------- --- |
4342| element | <code >HTMLElement</code > | The DOM element being animated |
4443
45- < a name = " module_resize-parent.. getDimension" ></ a >
44+ ### getDimension(wTransit, hTransit) ⇒ < code >string</ code > \| < code >undefined</ code >
4645
47- ### resize-parent~ getDimension(wTransit, hTransit) ⇒
4846Returns a string with the dimension to transition, or 'all' for both dimensions, or undefined if neither width nor height should be transitioned
4947
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
5250
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 |
5654| hTransit | <code >boolean</code > | Indicates if parent element should have height transition |
5755
58- < a name = " module_resize-parent.. setOverflowHidden" ></ a >
56+ ### setOverflowHidden(el)
5957
60- ### resize-parent~ setOverflowHidden(el)
6158Adds a CSS class which will set the overflow property to 'clip' (or 'hidden')
6259
63- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
60+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
6461
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 |
6865
69- < a name = " module_resize-parent.. removeOverflowHidden" ></ a >
66+ ### removeOverflowHidden(el)
7067
71- ### resize-parent~ removeOverflowHidden(el)
7268Removes the CSS class which sets the overflow property to 'clip' (or 'hidden')
7369
74- ** Kind** : inner method of [ <code >resize-parent</code >] ( #module_resize -parent )
70+ ** Kind** : inner method of [ <code >resize-parent</code >] ( #resize -parent )
7571
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 |
7975
80- < a name = " module_resize-parent.. initParentResize" ></ a >
76+ ### initParentResize(args) ⇒ < code >Object</ code >
8177
82- ### resize-parent~ initParentResize(args) ⇒
8378Handles parent element width/height transitions during child element's animation
8479
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
8782
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 |
9186
92- < a name = " module_resize-parent.. endParentResize" ></ a >
87+ ### endParentResize(element, opts)
9388
94- ### resize-parent~ endParentResize(element, opts)
9589Removes all CSS properties and classes added to the parent element to handle the dimensions transitions during the animation
9690
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 )
10392
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