How to resize or delete a single object from the canvas using Javascript?

Are there any changes to remove or modify the selected object from the canvas without changing another design.

For example: - I drew circles (for reference only Circle1, circle2, circle3). circle1 will be the bottom of the other two circles. Now I want to delete circle2 or resize. But this should not affect other circles.

And that there any change does this without using the pure Canavas method.

It should work like a PowerPoint design, just draw and resize and delete.

+3
source share
4 answers

, , canvas - , , , , .

, , , SVG

: " , , , . , , , ".

+4

. , , Canvas, .

, , CSS ( z-index )... . , .

SVG. .

0

Canvas . , .

, , , , - .

0

One option is to use a canvas library, such as fabric.js , which allows you to draw and programmatically use canvas objects . The presence of the contents of the canvas as a whole series of objects makes it easy to dynamically change these objects without affecting anything; move, resize, delete, clone, change properties (color, opacity, etc.).

0
source

Source: https://habr.com/ru/post/1787631/


All Articles