Skip to content

Commit 14418c8

Browse files
Fix cropper issue
1 parent d4ca485 commit 14418c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-image-markup",
3-
"version": "3.0.13",
3+
"version": "3.0.14",
44
"description": "vue-image-markup will provide you to edit uploaded image easily and save it.",
55
"main": "src/Editor.vue",
66
"repository": {

src/assets/js/crop.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ export default (function () {
8888
inst.canvas.add(rect);
8989
fabric.Image.fromURL(src, function (oImg1) {
9090
rectRed = new fabric.Rect({
91-
left: (oImg1.width - properties.width) / 2,
92-
top: (oImg1.height - properties.height) / 2,
91+
left: (oImg1.width - cropperWidth) / 2,
92+
top: (oImg1.height - cropperHeight) / 2,
9393
width: cropperWidth,
9494
height: cropperHeight,
9595
fill: '',
@@ -104,7 +104,7 @@ export default (function () {
104104
hasRotatingPoint: properties.hasRotatingPoint,
105105
lockUniScaling: JSON.parse(properties.lockUniScaling),
106106
noScaleCache: JSON.parse(properties.noScaleCache),
107-
strokeUniform: JSON.parse(properties.strokeUniform),
107+
strokeUniform: JSON.parse( properties.strokeUniform),
108108
clipTo: function (context) {
109109
context.translate(-this.width / 2, -this.height / 2);
110110
for (let x = 0; x <= this.width; x += this.width / 3) {

0 commit comments

Comments
 (0)