@aptoma/aoi-smart-crop
Advanced tools
Comparing version 0.1.5 to 0.2.0
@@ -21,2 +21,3 @@ 'use strict'; | ||
exports.getResizedImageUrl = (imageUrl, targetSize, actions, transformToken) => { | ||
normalizeActions(actions); | ||
const baseUrl = imageUrl.split('?')[0]; | ||
@@ -49,1 +50,12 @@ | ||
}; | ||
function normalizeActions(actions) { | ||
if (actions.crop) { | ||
if (actions.crop.height) { | ||
actions.crop.height = Math.ceil(actions.crop.height); | ||
} | ||
if (actions.crop.width) { | ||
actions.crop.width = Math.ceil(actions.crop.width); | ||
} | ||
} | ||
} |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.1.5", | ||
"version": "0.2.0", | ||
"description": "Helper library for doing smart crops of images based on area of interest data", | ||
@@ -10,0 +10,0 @@ "main": "lib/index.js", |
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
21783
572