Skip to content

Commit

Permalink
Fix cropper issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lilitsimonyan98 committed Apr 22, 2020
1 parent d4ca485 commit 14418c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-image-markup",
"version": "3.0.13",
"version": "3.0.14",
"description": "vue-image-markup will provide you to edit uploaded image easily and save it.",
"main": "src/Editor.vue",
"repository": {
Expand Down
6 changes: 3 additions & 3 deletions src/assets/js/crop.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ export default (function () {
inst.canvas.add(rect);
fabric.Image.fromURL(src, function (oImg1) {
rectRed = new fabric.Rect({
left: (oImg1.width - properties.width) / 2,
top: (oImg1.height - properties.height) / 2,
left: (oImg1.width - cropperWidth) / 2,
top: (oImg1.height - cropperHeight) / 2,
width: cropperWidth,
height: cropperHeight,
fill: '',
Expand All @@ -104,7 +104,7 @@ export default (function () {
hasRotatingPoint: properties.hasRotatingPoint,
lockUniScaling: JSON.parse(properties.lockUniScaling),
noScaleCache: JSON.parse(properties.noScaleCache),
strokeUniform: JSON.parse(properties.strokeUniform),
strokeUniform: JSON.parse( properties.strokeUniform),
clipTo: function (context) {
context.translate(-this.width / 2, -this.height / 2);
for (let x = 0; x <= this.width; x += this.width / 3) {
Expand Down

0 comments on commit 14418c8

Please sign in to comment.