@jiaminghi/c-render
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -285,2 +285,20 @@ import { deepClone } from '../extend/methods' | ||
function deleteAllElements () { | ||
this.elements = [] | ||
this.drawAllGraph() | ||
} | ||
function deleteElement (element) { | ||
const { elements } = this | ||
const index = elements.findIndex(ele => ele === element) | ||
if (index === -1) return | ||
elements.splice(index, 1) | ||
this.drawAllGraph() | ||
} | ||
const prototypes = { | ||
@@ -300,3 +318,5 @@ add, | ||
initTransform, | ||
restoreTransform | ||
restoreTransform, | ||
deleteAllElements, | ||
deleteElement | ||
} | ||
@@ -303,0 +323,0 @@ |
{ | ||
"name": "@jiaminghi/c-render", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"author": "JiaMing <743192023@qq.com>", | ||
@@ -5,0 +5,0 @@ "description": "Canvas-based vector graphics rendering plugin", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38487
13
1144