Skip to content

Commit

Permalink
build: release 1.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Oct 4, 2019
1 parent 70918dc commit 89f0b50
Show file tree
Hide file tree
Showing 12 changed files with 1,229 additions and 831 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## next
## 1.5.6 (Oct 4, 2019)

- Improve event type determining for iOS 13+ (#571).

Expand Down
66 changes: 58 additions & 8 deletions dist/cropper.common.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.5
* Cropper.js v1.5.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-08-04T02:26:31.160Z
* Date: 2019-10-04T04:33:48.372Z
*/

'use strict';
Expand Down Expand Up @@ -46,6 +46,55 @@ function _createClass(Constructor, protoProps, staticProps) {
return Constructor;
}

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}

return obj;
}

function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);

if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}

return keys;
}

function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};

if (i % 2) {
ownKeys(source, true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(source).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}

return target;
}

function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
Expand Down Expand Up @@ -736,7 +785,8 @@ function getTransforms(_ref) {
*/

function getMaxZoomRatio(pointers) {
var pointers2 = assign({}, pointers);
var pointers2 = _objectSpread2({}, pointers);

var ratios = [];
forEach(pointers, function (pointer, pointerId) {
delete pointers2[pointerId];
Expand Down Expand Up @@ -770,7 +820,7 @@ function getPointer(_ref2, endOnly) {
endX: pageX,
endY: pageY
};
return endOnly ? end : assign({
return endOnly ? end : _objectSpread2({
startX: pageX,
startY: pageY
}, end);
Expand Down Expand Up @@ -1814,10 +1864,10 @@ var handlers = {
var buttons = event.buttons,
button = event.button;

if (this.disabled // No primary button (Usually the left button)
// Note that touch events have no `buttons` or `button` property
|| isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
|| event.ctrlKey) {
if (this.disabled // Handle mouse event and pointer event and ignore touch event
|| (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button)
isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
|| event.ctrlKey)) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions dist/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.5
* Cropper.js v1.5.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-08-04T02:26:27.232Z
* Date: 2019-10-04T04:33:44.164Z
*/

.cropper-container {
Expand Down
66 changes: 58 additions & 8 deletions dist/cropper.esm.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.5
* Cropper.js v1.5.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-08-04T02:26:31.160Z
* Date: 2019-10-04T04:33:48.372Z
*/

function _typeof(obj) {
Expand Down Expand Up @@ -44,6 +44,55 @@ function _createClass(Constructor, protoProps, staticProps) {
return Constructor;
}

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}

return obj;
}

function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);

if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}

return keys;
}

function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};

if (i % 2) {
ownKeys(source, true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(source).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}

return target;
}

function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
Expand Down Expand Up @@ -734,7 +783,8 @@ function getTransforms(_ref) {
*/

function getMaxZoomRatio(pointers) {
var pointers2 = assign({}, pointers);
var pointers2 = _objectSpread2({}, pointers);

var ratios = [];
forEach(pointers, function (pointer, pointerId) {
delete pointers2[pointerId];
Expand Down Expand Up @@ -768,7 +818,7 @@ function getPointer(_ref2, endOnly) {
endX: pageX,
endY: pageY
};
return endOnly ? end : assign({
return endOnly ? end : _objectSpread2({
startX: pageX,
startY: pageY
}, end);
Expand Down Expand Up @@ -1812,10 +1862,10 @@ var handlers = {
var buttons = event.buttons,
button = event.button;

if (this.disabled // No primary button (Usually the left button)
// Note that touch events have no `buttons` or `button` property
|| isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
|| event.ctrlKey) {
if (this.disabled // Handle mouse event and pointer event and ignore touch event
|| (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button)
isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
|| event.ctrlKey)) {
return;
}

Expand Down
66 changes: 58 additions & 8 deletions dist/cropper.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.5
* Cropper.js v1.5.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-08-04T02:26:31.160Z
* Date: 2019-10-04T04:33:48.372Z
*/

(function (global, factory) {
Expand Down Expand Up @@ -50,6 +50,55 @@
return Constructor;
}

function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}

return obj;
}

function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);

if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}

return keys;
}

function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};

if (i % 2) {
ownKeys(source, true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(source).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}

return target;
}

function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
}
Expand Down Expand Up @@ -740,7 +789,8 @@
*/

function getMaxZoomRatio(pointers) {
var pointers2 = assign({}, pointers);
var pointers2 = _objectSpread2({}, pointers);

var ratios = [];
forEach(pointers, function (pointer, pointerId) {
delete pointers2[pointerId];
Expand Down Expand Up @@ -774,7 +824,7 @@
endX: pageX,
endY: pageY
};
return endOnly ? end : assign({
return endOnly ? end : _objectSpread2({
startX: pageX,
startY: pageY
}, end);
Expand Down Expand Up @@ -1818,10 +1868,10 @@
var buttons = event.buttons,
button = event.button;

if (this.disabled // No primary button (Usually the left button)
// Note that touch events have no `buttons` or `button` property
|| isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
|| event.ctrlKey) {
if (this.disabled // Handle mouse event and pointer event and ignore touch event
|| (event.type === 'mousedown' || event.type === 'pointerdown' && event.pointerType === 'mouse') && ( // No primary button (Usually the left button)
isNumber(buttons) && buttons !== 1 || isNumber(button) && button !== 0 // Open context menu
|| event.ctrlKey)) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions dist/cropper.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/cropper.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/css/cropper.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*!
* Cropper.js v1.5.5
* Cropper.js v1.5.6
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2019-08-04T02:26:27.232Z
* Date: 2019-10-04T04:33:44.164Z
*/

.cropper-container {
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="JavaScript image cropper.">
<meta name="author" content="Chen Fengyuan">
<title>Cropper.js</title>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="css/cropper.css">
<link rel="stylesheet" href="css/main.css">
Expand Down Expand Up @@ -80,7 +80,7 @@
<div class="container">
<div class="row">
<div class="col-md">
<h1>Cropper.js <small class="h6">v1.5.5</small></h1>
<h1>Cropper.js <small class="h6">v1.5.6</small></h1>
<p class="lead">JavaScript image cropper.</p>
</div>
<div class="col-md">
Expand Down
Loading

0 comments on commit 89f0b50

Please sign in to comment.