Skip to content

Commit caf9374

Browse files
Add properties to make cropper resizable
1 parent e5f1997 commit caf9374

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
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.10",
3+
"version": "3.0.11",
44
"description": "vue-image-markup will provide you to edit uploaded image easily and save it.",
55
"main": "src/Editor.vue",
66
"repository": {

src/Editor.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
strokeUniform: (params && params.strokeUniform) ? params.strokeUniform : true,
158158
noScaleCache: (params && params.noScaleCache) ? params.noScaleCache : false,
159159
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false,
160-
borderRadius: (params && params.borderRadius) ? params.borderRadius : 0
160+
borderRadius: (params && params.borderRadius) ? params.borderRadius : 0,
161161
};
162162
this.customRect(type, this.params);
163163
break;
@@ -241,6 +241,9 @@
241241
cornerColor: (params && params.cornerColor) ? params.cornerColor : "#000",
242242
cornerStyle: (params && params.cornerStyle) ? params.cornerStyle : "circle",
243243
strokeColor: (params && params.strokeColor) ? params.strokeColor : "#000",
244+
lockUniScaling: (params && params.lockUniScaling) ? params.lockUniScaling : true,
245+
noScaleCache: (params && params.noScaleCache) ? params.noScaleCache : false,
246+
strokeUniform: (params && params.strokeUniform) ? params.strokeUniform : true,
244247
};
245248
this.currentActiveMethod = this.cropImage;
246249
this.drag();

src/assets/js/crop.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ export default (function () {
102102
cornerStyle: properties.cornerStyle,
103103
transparentCorners: properties.transparentCorners,
104104
hasRotatingPoint: properties.hasRotatingPoint,
105-
lockUniScaling: true,
106-
noScaleCache: false,
107-
strokeUniform: true,
105+
lockUniScaling: properties.lockUniScaling,
106+
noScaleCache: properties.noScaleCache,
107+
strokeUniform: 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)