Skip to content

deleteElement

Introduction

addElement Delete elements to the drawing and trigger a rerender.

Arugments

  • {string} uuid

Returns

None

Usage

js
import { iDraw } from 'idraw';

const app = document.querySelector('#app');
const options = {
  width: 600,
  height: 400,
  devicePixelRatio: 2
};
const data = {
  elements: [
    // ....
  ]
};
const idraw = new iDraw(app, options);
idraw.setData(data);

const uuid = idraw.getData().elements[0].uuid;

idraw.deleteElement(uuid);

示例

Example

More Demo >>