From 8804de438d52b23fb2ca6ab97821ff4545954186 Mon Sep 17 00:00:00 2001 From: Andrew Bagshaw Date: Thu, 30 Nov 2017 16:44:37 -0800 Subject: [PATCH] Fix unwanted crop_options modification --- src/salieo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/salieo.js b/src/salieo.js index 9a1a5b6..7451440 100644 --- a/src/salieo.js +++ b/src/salieo.js @@ -295,7 +295,7 @@ function salieo(userOptions) { var tmpElementRect; for(var i = 0; i < loadedImages.length; i++) { loadedImages[i].elementRect = loadedImages[i].element.getBoundingClientRect(); - loadedImages[i].cropOptions = options.crop_options; + loadedImages[i].cropOptions = Object.create(options.crop_options); addAvoidArea(loadedImages[i], avoidAreas); addAttributes(loadedImages[i]);