Skip to content

Commit 21d5312

Browse files
Add links to qualifiers (#377)
1 parent 3223bc7 commit 21d5312

39 files changed

+87
-37
lines changed

src/actions/effect.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ function theme(color: SystemColors): ThemeEffect {
457457
* import {Cloudinary} from "@cloudinary/base";
458458
* // Import everything, or just the action you need for tree-shaking purposes
459459
* import {Effect, sepia} from "@cloudinary/base/actions/effect";
460+
* import {ArtisticFilter, alDente} from "../../../src/qualifiers/artisticFilter";
461+
* import {ShakeStrength, pixels16} from "../../../src/qualifiers/shakeStrength";
460462
*
461463
* const yourCldInstance = new Cloudinary({cloud:{cloudName:'demo'}});
462464
* const image = yourCldInstance.image('woman');
@@ -495,7 +497,8 @@ function theme(color: SystemColors): ThemeEffect {
495497
* .effect(Effect.vignette().strength(5))
496498
* .effect(Effect.deshake())
497499
* .effect(Effect.deshake(10))
498-
* .effect(Effect.deshake().shakeStrength(ShakeStrength.pixels16()))
500+
* .effect(Effect.artisticFilter(alDente())
501+
* .effect(Effect.deshake().shakeStrength(pixels16()))
499502
*/
500503
const Effect = {
501504
pixelate: pixelate,

src/qualifiers/FontAntialias.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* <b>Learn more</b>: {@link https://cloudinary.com/documentation/video_manipulation_and_delivery#adding_text_captions | Adding text overlays to videos}
55
* @memberOf Qualifiers
66
* @namespace FontAntialias
7+
* @see To be used with {@link Qualifiers.TextStyle|Text Style}
78
*/
89

910
/**

src/qualifiers/animatedFormat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {AnimatedFormatQualifierValue} from "./animatedFormat/AnimatedFormatQuali
44
* @description Contains methods to specify the animated format
55
* @namespace AnimatedFormat
66
* @memberOf Qualifiers
7+
* @see Visit {@link Actions.Transcode|Transcode} for an example
78
*/
89

910

src/qualifiers/artisticFilter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Learn more: {@link https://cloudinary.com/documentation/image_transformations#artistic_filter_effects | Custom functions}
44
* @namespace ArtisticFilter
55
* @memberOf Qualifiers
6+
* @see Visit {@link Actions.Effect|Effect} for an example
67
*/
78

89

src/qualifiers/aspectRatio.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ function ignoreInitialAspectRatio(): FlagQualifier {
7979
* This is used in the context of resize actions
8080
* @namespace AspectRatio
8181
* @memberOf Qualifiers
82+
* @see Visit {@link Actions.Resize|Resize} for an example
8283
*/
8384
const AspectRatio = {
8485
ar1X1,

src/qualifiers/audioCodec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @description Contains functions to select an audio codec.
33
* @memberOf Qualifiers
44
* @namespace AudioCodec
5+
* @see Visit {@link Actions.Transcode|Transcode} for an example
56
*/
67

78
/**

src/qualifiers/audioFrequency.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
* @description Controls the audio sampling frequency.
33
* @namespace AudioFrequency
44
* @memberOf Qualifiers
5+
* @see Visit {@link Actions.Transcode|Transcode} for an example
56
*/
67

78

src/qualifiers/autoFocus.ts

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
import {QualifierValue} from "../internal/qualifier/QualifierValue";
22
import {FocusOnValue} from "./focusOn";
33

4-
5-
/**
6-
* Accepts an AutoFocusObject (which is just a wrapper for a FocusOn object, but with extra method: avoid, weight)
7-
* @param {AutoFocus} AutoFocusObjects
8-
*/
9-
104
/**
115
* @summary qualifier
12-
* @description A wrapper class around a FocusOn object.
136
* @namespace AutoFocus
147
* @memberOf Qualifiers
8+
* @see Visit {@link Qualifiers.Gravity|Gravity} for an example
9+
*/
10+
11+
12+
/**
13+
* @memberOf Qualifiers.AutoFocus
1514
* @extends {SDK.QualifierValue}
15+
* @see Visit {@link Qualifiers.Gravity|Gravity} for an example
1616
*/
1717
class AutoFocus extends QualifierValue {
18-
readonly focusOn:FocusOnValue;
18+
readonly focusOn: FocusOnValue;
1919
private _weight: number | string;
20-
private shouldAvoid:boolean;
20+
private shouldAvoid: boolean;
2121

2222
/**
23-
* @summary qualifier
24-
* @description Specifies the object to focus on automatically
23+
* @summary qualifier
24+
* @description Specifies the object to focus on automatically
25+
* Accepts an AutoFocusObject (which is just a wrapper for a FocusOn object, but with extra method: avoid, weight)
2526
* @param {Qualifiers.FocusOn} obj The object to focus on.
2627
* @param {number} weight
2728
*/
2829
static focusOn(obj: FocusOnValue, weight?: number): AutoFocus {
2930
return new AutoFocus(obj, weight);
3031
}
3132

32-
constructor(focusOn:FocusOnValue, weight?: number | string) {
33+
constructor(focusOn: FocusOnValue, weight?: number | string) {
3334
super();
3435
this._weight = weight;
3536
this.focusOn = focusOn;
@@ -41,18 +42,18 @@ class AutoFocus extends QualifierValue {
4142
}
4243

4344
/**
44-
* @summary qualifier
45-
* @desc Get the name of the of the object
45+
* @summary qualifier
46+
* @desc Get the name of the of the object
4647
*/
47-
private getName():string {
48+
private getName(): string {
4849
return this.focusOn.name;
4950
}
5051

5152
/**
52-
* @summary qualifier
53-
* @desc Get the weight for the object
53+
* @summary qualifier
54+
* @desc Get the weight for the object
5455
*/
55-
private getWeight():number|string {
56+
private getWeight(): number | string {
5657
if (this.shouldAvoid) {
5758
return 'avoid';
5859
} else {
@@ -61,21 +62,21 @@ class AutoFocus extends QualifierValue {
6162
}
6263

6364
/**
64-
* @summary qualifier
65-
* @desc Return the string representation of this QualifierValue
65+
* @summary qualifier
66+
* @desc Return the string representation of this QualifierValue
6667
*/
67-
toString():string {
68+
toString(): string {
6869
// Future proofing, in case we'd like to support some custom string in the future, or if data is coming from a DB
69-
if(this.shouldAddWeight()) {
70+
if (this.shouldAddWeight()) {
7071
return `${this.getName()}_${this.getWeight()}`;
7172
} else {
7273
return `${this.getName()}`;
7374
}
7475
}
7576

7677
/**
77-
* @summary qualifier
78-
* @description Sets the importance level of the object within the automatic gravity algorithm
78+
* @summary qualifier
79+
* @description Sets the importance level of the object within the automatic gravity algorithm
7980
* @param {numebr} w The focus weight for the object
8081
* @return {this}
8182
*/
@@ -85,8 +86,8 @@ class AutoFocus extends QualifierValue {
8586
}
8687

8788
/**
88-
* @summary qualifier
89-
* @description Attempts to avoid the detected object in the image
89+
* @summary qualifier
90+
* @description Attempts to avoid the detected object in the image
9091
* @return {this}
9192
*/
9293
avoid(): this {

src/qualifiers/blendMode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {BlendModeQualifier} from "./blendMode/BlendModeQualifier";
55
* <b>Learn more:</b> {@link https://cloudinary.com/documentation/image_transformations#overlay_blending_effects|Overlay blending effects}
66
* @namespace BlendMode
77
* @memberOf Qualifiers
8+
* @see To be used with an {@link Actions.Overlay|Overlay}
89
*/
910

1011

src/qualifiers/chromaSubSampling.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ function chroma420():number { return 420; }
1717
* <b>Learn more</b>: {@link https://cloudinary.com/documentation/image_transformations#toggling_chroma_subsampling | Toggling chroma subsampling}
1818
* @memberOf Qualifiers
1919
* @namespace ChromeSubSampling
20+
* @see To be used in {@link Actions.Delivery|Delivery} action (Quality)
21+
* @see To be used in {@link Actions.Delivery.DeliveryQualityAction|Quality Action} class
2022
*/
2123
const ChromaSubSampling = {
2224
chroma444,

0 commit comments

Comments
 (0)