From 61287bb934e3734e678ea2af391323e8816c8a7d Mon Sep 17 00:00:00 2001 From: fengyuanchen Date: Sun, 21 Apr 2024 07:53:36 +0000 Subject: [PATCH] v1.6.2 --- css/cropper.css | 259 ++++++++++++++++++++++++------------------------ index.html | 2 +- js/cropper.js | 35 ++++--- 3 files changed, 150 insertions(+), 146 deletions(-) diff --git a/css/cropper.css b/css/cropper.css index 506909e6f..db40c6446 100644 --- a/css/cropper.css +++ b/css/cropper.css @@ -1,11 +1,11 @@ /*! - * Cropper.js v1.5.12 + * Cropper.js v1.6.2 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2021-06-12T08:00:11.623Z + * Date: 2024-04-21T07:43:02.731Z */ .cropper-container { @@ -14,23 +14,25 @@ line-height: 0; position: relative; -ms-touch-action: none; - touch-action: none; + touch-action: none; + -webkit-touch-callout: none; -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } .cropper-container img { - display: block; - height: 100%; - image-orientation: 0deg; - max-height: none !important; - max-width: none !important; - min-height: 0 !important; - min-width: 0 !important; - width: 100%; -} + backface-visibility: hidden; + display: block; + height: 100%; + image-orientation: 0deg; + max-height: none !important; + max-width: none !important; + min-height: 0 !important; + min-width: 0 !important; + width: 100%; + } .cropper-wrap-box, .cropper-canvas, @@ -76,22 +78,22 @@ } .cropper-dashed.dashed-h { - border-bottom-width: 1px; - border-top-width: 1px; - height: calc(100% / 3); - left: 0; - top: calc(100% / 3); - width: 100%; -} + border-bottom-width: 1px; + border-top-width: 1px; + height: calc(100% / 3); + left: 0; + top: calc(100% / 3); + width: 100%; + } .cropper-dashed.dashed-v { - border-left-width: 1px; - border-right-width: 1px; - height: 100%; - left: calc(100% / 3); - top: 0; - width: calc(100% / 3); -} + border-left-width: 1px; + border-right-width: 1px; + height: 100%; + left: calc(100% / 3); + top: 0; + width: calc(100% / 3); + } .cropper-center { display: block; @@ -104,26 +106,26 @@ } .cropper-center::before, -.cropper-center::after { - background-color: #eee; - content: ' '; - display: block; - position: absolute; -} + .cropper-center::after { + background-color: #eee; + content: ' '; + display: block; + position: absolute; + } .cropper-center::before { - height: 1px; - left: -3px; - top: 0; - width: 7px; -} + height: 1px; + left: -3px; + top: 0; + width: 7px; + } .cropper-center::after { - height: 7px; - left: 0; - top: -3px; - width: 1px; -} + height: 7px; + left: 0; + top: -3px; + width: 1px; + } .cropper-face, .cropper-line, @@ -146,32 +148,32 @@ } .cropper-line.line-e { - cursor: ew-resize; - right: -3px; - top: 0; - width: 5px; -} + cursor: ew-resize; + right: -3px; + top: 0; + width: 5px; + } .cropper-line.line-n { - cursor: ns-resize; - height: 5px; - left: 0; - top: -3px; -} + cursor: ns-resize; + height: 5px; + left: 0; + top: -3px; + } .cropper-line.line-w { - cursor: ew-resize; - left: -3px; - top: 0; - width: 5px; -} + cursor: ew-resize; + left: -3px; + top: 0; + width: 5px; + } .cropper-line.line-s { - bottom: -3px; - cursor: ns-resize; - height: 5px; - left: 0; -} + bottom: -3px; + cursor: ns-resize; + height: 5px; + left: 0; + } .cropper-point { background-color: #39f; @@ -181,93 +183,96 @@ } .cropper-point.point-e { - cursor: ew-resize; - margin-top: -3px; - right: -3px; - top: 50%; -} + cursor: ew-resize; + margin-top: -3px; + right: -3px; + top: 50%; + } .cropper-point.point-n { - cursor: ns-resize; - left: 50%; - margin-left: -3px; - top: -3px; -} + cursor: ns-resize; + left: 50%; + margin-left: -3px; + top: -3px; + } .cropper-point.point-w { - cursor: ew-resize; - left: -3px; - margin-top: -3px; - top: 50%; -} + cursor: ew-resize; + left: -3px; + margin-top: -3px; + top: 50%; + } .cropper-point.point-s { - bottom: -3px; - cursor: s-resize; - left: 50%; - margin-left: -3px; -} + bottom: -3px; + cursor: s-resize; + left: 50%; + margin-left: -3px; + } .cropper-point.point-ne { - cursor: nesw-resize; - right: -3px; - top: -3px; -} + cursor: nesw-resize; + right: -3px; + top: -3px; + } .cropper-point.point-nw { - cursor: nwse-resize; - left: -3px; - top: -3px; -} + cursor: nwse-resize; + left: -3px; + top: -3px; + } .cropper-point.point-sw { - bottom: -3px; - cursor: nesw-resize; - left: -3px; -} + bottom: -3px; + cursor: nesw-resize; + left: -3px; + } .cropper-point.point-se { - bottom: -3px; - cursor: nwse-resize; - height: 20px; - opacity: 1; - right: -3px; - width: 20px; -} + bottom: -3px; + cursor: nwse-resize; + height: 20px; + opacity: 1; + right: -3px; + width: 20px; + } @media (min-width: 768px) { - .cropper-point.point-se { - height: 15px; - width: 15px; + +.cropper-point.point-se { + height: 15px; + width: 15px; } -} + } @media (min-width: 992px) { - .cropper-point.point-se { - height: 10px; - width: 10px; + +.cropper-point.point-se { + height: 10px; + width: 10px; } -} + } @media (min-width: 1200px) { - .cropper-point.point-se { - height: 5px; - opacity: 0.75; - width: 5px; + +.cropper-point.point-se { + height: 5px; + opacity: 0.75; + width: 5px; } -} + } .cropper-point.point-se::before { - background-color: #39f; - bottom: -50%; - content: ' '; - display: block; - height: 200%; - opacity: 0; - position: absolute; - right: -50%; - width: 200%; -} + background-color: #39f; + bottom: -50%; + content: ' '; + display: block; + height: 200%; + opacity: 0; + position: absolute; + right: -50%; + width: 200%; + } .cropper-invisible { opacity: 0; diff --git a/index.html b/index.html index 3361bf5ef..8f567f3fe 100644 --- a/index.html +++ b/index.html @@ -80,7 +80,7 @@
-

Cropper.js v1.6.1

+

Cropper.js v1.6.2

JavaScript image cropper.

diff --git a/js/cropper.js b/js/cropper.js index 55a50c885..e9cf961a4 100644 --- a/js/cropper.js +++ b/js/cropper.js @@ -1,11 +1,11 @@ /*! - * Cropper.js v1.6.1 + * Cropper.js v1.6.2 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * - * Date: 2023-09-17T03:44:19.860Z + * Date: 2024-04-21T07:43:05.335Z */ (function (global, factory) { @@ -35,6 +35,20 @@ } return e; } + function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); + } + function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; + } function _typeof(o) { "@babel/helpers - typeof"; @@ -105,20 +119,6 @@ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _toPrimitive(input, hint) { - if (typeof input !== "object" || input === null) return input; - var prim = input[Symbol.toPrimitive]; - if (prim !== undefined) { - var res = prim.call(input, hint || "default"); - if (typeof res !== "object") return res; - throw new TypeError("@@toPrimitive must return a primitive value."); - } - return (hint === "string" ? String : Number)(input); - } - function _toPropertyKey(arg) { - var key = _toPrimitive(arg, "string"); - return typeof key === "symbol" ? key : String(key); - } var IS_BROWSER = typeof window !== 'undefined' && typeof window.document !== 'undefined'; var WINDOW = IS_BROWSER ? window : {}; @@ -2918,7 +2918,7 @@ this.sizing = false; this.init(); } - _createClass(Cropper, [{ + return _createClass(Cropper, [{ key: "init", value: function init() { var element = this.element; @@ -3265,7 +3265,6 @@ assign(DEFAULTS, isPlainObject(options) && options); } }]); - return Cropper; }(); assign(Cropper.prototype, render, preview, events, handlers, change, methods);