From 97890fe61c507f3c06a11fb1af85bc855fd6004f Mon Sep 17 00:00:00 2001 From: Lilit Date: Thu, 17 Sep 2020 10:46:16 +0400 Subject: [PATCH] Update readme for eraser --- README.md | 10 +++++++++- package.json | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5544975..494ca2c 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ mounted() { `editorId (optional)` will set editor id, allowing the use of multiple editors in the same component ## Function set(`type`,`params`) ##### With the set() function you choose editor's mode,which should get two parameters `type` and `params` -Editor have 6 modes +Editor have 7 modes - text - circle - rect @@ -52,6 +52,7 @@ Editor have 6 modes - arrow - freeDrawing - crop + - eraser `params` parameter must be an object which set the type and every type have it's own options. @@ -190,6 +191,13 @@ or you can customize your editor crop mode styles by overwriting default values. ```javascript this.$refs.editor.applyCropping() ``` + #### Eraser Mode +##### `set('eraser')` to enable eraser mode in editor, which will remove the object from editor when the object will be clicked. +```javascript +this.$refs.editor.set('eraser') +``` + + ## Function setBackgroundImage(imageUrl) ##### `setBackgroundImage(imageUrl)` to set editor background image ```vue diff --git a/package.json b/package.json index 41ff8cd..c1a8aa9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-image-markup", - "version": "3.1.9", + "version": "3.1.10", "description": "vue-image-markup will provide you to edit uploaded image easily and save it.", "main": "src/Editor.vue", "repository": {