Skip to content
This repository was archived by the owner on Apr 8, 2021. It is now read-only.

Commit c6e5095

Browse files
author
Amir Tocker
committed
Version 2.1.5
1 parent 7da2cd7 commit c6e5095

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+146849
-22
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloudinary-core",
3-
"version": "2.1.4",
3+
"version": "2.1.5",
44
"homepage": "http://cloudinary.com",
55
"authors": [
66
{

cloudinary-core-shrinkwrap.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/**
3-
* Cloudinary's JavaScript library - Version 2.1.4
3+
* Cloudinary's JavaScript library - Version 2.1.5
44
* Copyright Cloudinary
55
* see https://github.com/cloudinary/cloudinary_js
66
*
@@ -5787,9 +5787,7 @@ var slice = [].slice,
57875787
return this.param(value, "dpr", "dpr", (function(_this) {
57885788
return function(dpr) {
57895789
dpr = dpr.toString();
5790-
if ((dpr === "auto") && _this.getValue("client_hints") !== true) {
5791-
return "1.0";
5792-
} else if (dpr != null ? dpr.match(/^\d+$/) : void 0) {
5790+
if (dpr != null ? dpr.match(/^\d+$/) : void 0) {
57935791
return dpr + ".0";
57945792
} else {
57955793
return dpr;
@@ -6474,7 +6472,7 @@ var slice = [].slice,
64746472
Cloudinary = (function() {
64756473
var AKAMAI_SHARED_CDN, CF_SHARED_CDN, DEFAULT_POSTER_OPTIONS, DEFAULT_VIDEO_SOURCE_TYPES, OLD_AKAMAI_SHARED_CDN, SHARED_CDN, VERSION, absolutize, applyBreakpoints, cdnSubdomainNumber, closestAbove, cloudinaryUrlPrefix, defaultBreakpoints, finalizeResourceType, findContainerWidth, maxWidth, updateDpr;
64766474

6477-
VERSION = "2.1.4";
6475+
VERSION = "2.1.5";
64786476

64796477
CF_SHARED_CDN = "d3jpl91pxevbkh.cloudfront.net";
64806478

@@ -6938,7 +6936,14 @@ var slice = [].slice,
69386936

69396937

69406938
/**
6939+
* Initialize the responsive behaviour.<br>
6940+
* Calls {@link Cloudinary#cloudinary_update} to modify image tags.
69416941
* @function Cloudinary#responsive
6942+
* @param {Object} options
6943+
* @param {String} [options.responsive_class='cld-responsive'] - provide an alternative class used to locate img tags
6944+
* @param {number} [options.responsive_debounce=100] - the debounce interval in milliseconds.
6945+
* @param {boolean} [bootstrap=true] if true processes the img tags by calling cloudinary_update. When false the tags will be processed only after a resize event.
6946+
* @see {@link Cloudinary#cloudinary_update} for additional configuration parameters
69426947
*/
69436948

69446949
Cloudinary.prototype.responsive = function(options, bootstrap) {
@@ -7114,6 +7119,8 @@ var slice = [].slice,
71147119

71157120
/**
71167121
* Finds all `img` tags under each node and sets it up to provide the image through Cloudinary
7122+
* @param {Element[]} nodes the parent nodes to search for img under
7123+
* @param {Object} [options={}] options and transformations params
71177124
* @function Cloudinary#processImageTags
71187125
*/
71197126

@@ -7122,6 +7129,9 @@ var slice = [].slice,
71227129
if (options == null) {
71237130
options = {};
71247131
}
7132+
if (Util.isEmpty(nodes)) {
7133+
return this;
7134+
}
71257135
options = Util.defaults({}, options, this.config());
71267136
images = (function() {
71277137
var j, len, ref, results;
@@ -7210,8 +7220,8 @@ var slice = [].slice,
72107220
}
72117221
client_hints = (ref = (ref1 = options.client_hints) != null ? ref1 : this.config('client_hints')) != null ? ref : false;
72127222
client_hints = client_hints || (typeof document !== "undefined" && document !== null ? document.querySelector('meta[http-equiv="Accept-CH"]') : void 0);
7213-
if (client_hints) {
7214-
return;
7223+
if (client_hints || elements === null) {
7224+
return this;
72157225
}
72167226
responsive = (ref2 = (ref3 = options.responsive) != null ? ref3 : this.config('responsive')) != null ? ref2 : false;
72177227
elements = (function() {
@@ -7298,7 +7308,7 @@ var slice = [].slice,
72987308
TextLayer: TextLayer,
72997309
SubtitlesLayer: SubtitlesLayer,
73007310
Cloudinary: Cloudinary,
7301-
VERSION: "2.1.4"
7311+
VERSION: "2.1.5"
73027312
};
73037313
return cloudinary;
73047314
});

cloudinary-core-shrinkwrap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudinary-core-shrinkwrap.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudinary-core.js

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
/**
3-
* Cloudinary's JavaScript library - Version 2.1.4
3+
* Cloudinary's JavaScript library - Version 2.1.5
44
* Copyright Cloudinary
55
* see https://github.com/cloudinary/cloudinary_js
66
*
@@ -2292,9 +2292,7 @@ var slice = [].slice,
22922292
return this.param(value, "dpr", "dpr", (function(_this) {
22932293
return function(dpr) {
22942294
dpr = dpr.toString();
2295-
if ((dpr === "auto") && _this.getValue("client_hints") !== true) {
2296-
return "1.0";
2297-
} else if (dpr != null ? dpr.match(/^\d+$/) : void 0) {
2295+
if (dpr != null ? dpr.match(/^\d+$/) : void 0) {
22982296
return dpr + ".0";
22992297
} else {
23002298
return dpr;
@@ -2979,7 +2977,7 @@ var slice = [].slice,
29792977
Cloudinary = (function() {
29802978
var AKAMAI_SHARED_CDN, CF_SHARED_CDN, DEFAULT_POSTER_OPTIONS, DEFAULT_VIDEO_SOURCE_TYPES, OLD_AKAMAI_SHARED_CDN, SHARED_CDN, VERSION, absolutize, applyBreakpoints, cdnSubdomainNumber, closestAbove, cloudinaryUrlPrefix, defaultBreakpoints, finalizeResourceType, findContainerWidth, maxWidth, updateDpr;
29812979

2982-
VERSION = "2.1.4";
2980+
VERSION = "2.1.5";
29832981

29842982
CF_SHARED_CDN = "d3jpl91pxevbkh.cloudfront.net";
29852983

@@ -3443,7 +3441,14 @@ var slice = [].slice,
34433441

34443442

34453443
/**
3444+
* Initialize the responsive behaviour.<br>
3445+
* Calls {@link Cloudinary#cloudinary_update} to modify image tags.
34463446
* @function Cloudinary#responsive
3447+
* @param {Object} options
3448+
* @param {String} [options.responsive_class='cld-responsive'] - provide an alternative class used to locate img tags
3449+
* @param {number} [options.responsive_debounce=100] - the debounce interval in milliseconds.
3450+
* @param {boolean} [bootstrap=true] if true processes the img tags by calling cloudinary_update. When false the tags will be processed only after a resize event.
3451+
* @see {@link Cloudinary#cloudinary_update} for additional configuration parameters
34473452
*/
34483453

34493454
Cloudinary.prototype.responsive = function(options, bootstrap) {
@@ -3619,6 +3624,8 @@ var slice = [].slice,
36193624

36203625
/**
36213626
* Finds all `img` tags under each node and sets it up to provide the image through Cloudinary
3627+
* @param {Element[]} nodes the parent nodes to search for img under
3628+
* @param {Object} [options={}] options and transformations params
36223629
* @function Cloudinary#processImageTags
36233630
*/
36243631

@@ -3627,6 +3634,9 @@ var slice = [].slice,
36273634
if (options == null) {
36283635
options = {};
36293636
}
3637+
if (Util.isEmpty(nodes)) {
3638+
return this;
3639+
}
36303640
options = Util.defaults({}, options, this.config());
36313641
images = (function() {
36323642
var j, len, ref, results;
@@ -3715,8 +3725,8 @@ var slice = [].slice,
37153725
}
37163726
client_hints = (ref = (ref1 = options.client_hints) != null ? ref1 : this.config('client_hints')) != null ? ref : false;
37173727
client_hints = client_hints || (typeof document !== "undefined" && document !== null ? document.querySelector('meta[http-equiv="Accept-CH"]') : void 0);
3718-
if (client_hints) {
3719-
return;
3728+
if (client_hints || elements === null) {
3729+
return this;
37203730
}
37213731
responsive = (ref2 = (ref3 = options.responsive) != null ? ref3 : this.config('responsive')) != null ? ref2 : false;
37223732
elements = (function() {
@@ -3803,7 +3813,7 @@ var slice = [].slice,
38033813
TextLayer: TextLayer,
38043814
SubtitlesLayer: SubtitlesLayer,
38053815
Cloudinary: Cloudinary,
3806-
VERSION: "2.1.4"
3816+
VERSION: "2.1.5"
38073817
};
38083818
return cloudinary;
38093819
});

cloudinary-core.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cloudinary-core.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)