0

I am working in one image editing tool in which i need one functionality of image clipping mask.

I am using fabric js latest version.

I have put one toggle button for clip image into circle. and want to toggle it from circle to square(or other fix shape) and square(or other fix shape) to circle.

So I think , when toggle button is on then i clip my image with circle.

But i don't know how to remove that clip mask if toggle button is off.

Is there any way to remove that clip-Path mask from image object in fabric js.

Scenario look like this enter image description here

Mayur Kukadiya
  • 2,461
  • 1
  • 25
  • 58

1 Answers1

0

on your click event, try:

YourImage.clipPath = null
QuickSilver
  • 3,915
  • 2
  • 13
  • 29