Skip to content

Commit b97469d

Browse files
author
Amir Tocker
committed
Add documentation
1 parent 77019bc commit b97469d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/components/CloudinaryComponent/CloudinaryComponent.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ export default class CloudinaryComponent extends Component {
3535
} else return null;
3636
}
3737

38+
/**
39+
* Returns an object with all the transformation parameters based on the context and properties of this element
40+
* and any children.
41+
* @param options
42+
* @returns {object} a hash of transformation and configuration parameters
43+
*/
3844
getTransformation(options) {
3945
var transformation;
4046
if (this.props.children !== undefined) {
@@ -66,6 +72,11 @@ export default class CloudinaryComponent extends Component {
6672
, {});
6773
}
6874

75+
/**
76+
* Generate a Cloudinary resource URL based on the options provided and child Transformation elements
77+
* @param options
78+
* @returns {string} a cloudinary URL
79+
*/
6980
getUrl(options) {
7081
let transformation = this.getTransformation(options);
7182
let cl = Cloudinary.new(options);

0 commit comments

Comments
 (0)