cloudimage-responsive-utils
Advanced tools
Comparing version 2.3.0-beta.2 to 2.3.0
@@ -29,2 +29,26 @@ # Changelog | ||
# 2.3.0 - 2021-06-16 | ||
### Deprecated | ||
Property **ignoreNodeImgSize** is deprecated. Use **imageSizeAttributes: 'ignore'** instead | ||
### Added | ||
- new property: | ||
##### **imageSizeAttributes** | ||
###### Type: **String** | possible values: 'use', 'ignore', 'take-ratio' | Default: **'use'** | ||
If width and height attributes are set: | ||
**use** - width & height attributes values will be used to calculate image size (according to user's DPR) and **ratio**. | ||
**take-ratio** - width & height attributes values will be used only to calculate **ratio**. | ||
**ignore** - width & height attributes will be ignored. | ||
If width and height attributes are NOT set, image container size will be detected to calculate result image size (according to user's DPR) | ||
*Note*: If only width or height attributes is set, ratio is going to be taken from ci-ratio image attribute | ||
# 2.2.0 - 2021-06-16 | ||
@@ -31,0 +55,0 @@ ### Added |
@@ -16,4 +16,3 @@ "use strict"; | ||
imgNodeHeight = _ref.imgNodeHeight; | ||
var saveNodeImgRatio = config.saveNodeImgRatio, | ||
imageSizeAttributes = config.imageSizeAttributes; | ||
var imageSizeAttributes = config.imageSizeAttributes; | ||
var ignoreNodeRatio = imageSizeAttributes === 'ignore'; | ||
@@ -20,0 +19,0 @@ |
{ | ||
"name": "cloudimage-responsive-utils", | ||
"version": "2.3.0-beta.2", | ||
"version": "2.3.0", | ||
"description": "cloudimage responsive utils", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
export const getRatio = ({ imgNodeRatio, width, height, size, config, imgNodeWidth, imgNodeHeight }) => { | ||
const { saveNodeImgRatio, imageSizeAttributes } = config; | ||
const { imageSizeAttributes } = config; | ||
const ignoreNodeRatio = imageSizeAttributes === 'ignore'; | ||
@@ -4,0 +4,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
103632
0
2482