assets/js/jquery.cloudinary.js in cloudinary-1.0.26 vs assets/js/jquery.cloudinary.js in cloudinary-1.0.27
- old
+ new
@@ -24,15 +24,16 @@
if (size) {
var split_size = size.split("x");
options['width'] = width = split_size[0];
options['height'] = height = split_size[1];
}
- if (width && parseFloat(width) < 1) delete options['width'];
- if (height && parseFloat(height) < 1) delete options['height'];
+ var has_layer = options.overlay || options.underlay;
+ if (width && (has_layer || parseFloat(width) < 1)) delete options['width'];
+ if (height && (has_layer || parseFloat(height) < 1)) delete options['height'];
var crop = option_consume(options, 'crop');
- if (!crop) width = height = undefined;
+ if (!crop && !has_layer) width = height = undefined;
var background = option_consume(options, 'background');
background = background && background.replace(/^#/, 'rgb:');
var base_transformations = build_array(option_consume(options, 'transformation', []));
@@ -56,9 +57,10 @@
gravity: 'g',
quality: 'q',
prefix: 'p',
default_image: 'd',
angle: 'a',
+ underlay: 'u',
overlay: 'l',
fetch_format: 'f'
};
for (var param in simple_params) {
params.push([simple_params[param], option_consume(options, param)]);