Skip to content

Commit

Permalink
Changes in get object by id method
Browse files Browse the repository at this point in the history
  • Loading branch information
lilitsimonyan98 committed Aug 6, 2020
1 parent 616a933 commit 1ea7627
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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.1.6",
"version": "3.1.7",
"description": "vue-image-markup will provide you to edit uploaded image easily and save it.",
"main": "src/Editor.vue",
"repository": {
Expand Down
16 changes: 12 additions & 4 deletions src/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
fontStyle: (params && params.fontStyle) ? params.fontStyle : this.fontStyle,
fontWeight: (params && params.fontWeight) ? params.fontWeight : this.fontWeight,
placeholder: (params && params.placeholder) ? params.placeholder : 'Add Text',
id: (params && params.id) ? params.id : '',
};
this.addText(this.params);
break;
Expand All @@ -141,7 +142,8 @@
radius: (params && params.radius) ? params.radius : 20,
strokeUniform: (params && params.strokeUniform) ? params.strokeUniform : true,
noScaleCache: (params && params.noScaleCache) ? params.noScaleCache : false,
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false,
id: (params && params.id) ? params.id : '',
};
this.customCircle(type, this.params);
break;
Expand All @@ -162,6 +164,7 @@
noScaleCache: (params && params.noScaleCache) ? params.noScaleCache : false,
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false,
borderRadius: (params && params.borderRadius) ? params.borderRadius : 0,
id: (params && params.id) ? params.id : '',
};
this.customRect(type, this.params);
break;
Expand All @@ -181,7 +184,8 @@
strokeUniform: (params && params.strokeUniform) ? params.strokeUniform : true,
noScaleCache: (params && params.noScaleCache) ? params.noScaleCache : false,
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false,
borderRadius: (params && params.borderRadius) ? params.borderRadius : 0
borderRadius: (params && params.borderRadius) ? params.borderRadius : 0,
id: (params && params.id) ? params.id : '',
};
this.customRect(type, this.params);
break;
Expand All @@ -200,7 +204,8 @@
opacity: (params && params.opacity) ? params.opacity : 1,
strokeUniform: (params && params.strokeUniform) ? params.strokeUniform : true,
noScaleCache: (params && params.noScaleCache) ? params.noScaleCache : false,
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false,
id: (params && params.id) ? params.id : '',
};
this.customRect(type, this.params);
break;
Expand All @@ -217,7 +222,8 @@
strokeWidth: (params && params.strokeWidth) ? params.strokeWidth : this.strokeWidth,
strokeUniform: (params && params.strokeUniform) ? params.strokeUniform : true,
noScaleCache: (params && params.noScaleCache) ? params.noScaleCache : false,
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false
strokeDashArray: (params && params.strokeDashArray) ? params.strokeDashArray : false,
id: (params && params.id) ? params.id : '',
};
this.drawArrow(this.params);
break;
Expand All @@ -227,6 +233,7 @@
stroke: (params && params.stroke) ? params.stroke : this.color,
strokeWidth: (params && params.strokeWidth) ? params.strokeWidth : this.strokeWidth,
drawingMode: (params && params.drawingMode) ? params.drawingMode : true,
id: (params && params.id) ? params.id : '',
};
this.drawing(this.params);
break;
Expand Down Expand Up @@ -488,6 +495,7 @@
blur: 0,
affectStroke: true,
color: params.stroke,
id: params.id ? params.id : ''
});
let inst = this;
this.canvas.on("object:added", function () {
Expand Down

0 comments on commit 1ea7627

Please sign in to comment.