Wednesday 6 January 2021

FabricJS Rendering a shadow around active object/selection?

Quick and simple: Is there a way that I can achieve the following effect after clicking on an active FabricJS element or active selection? Basically, as well as the border, I'd like to render a shadow/border effect around the active elements. Once you click away, the shadow will be removed.

Example code: (sourced from this answer)

img {
  -webkit-filter: drop-shadow(1px 1px 0 black)
                  drop-shadow(-1px -1px 0 black);
  filter: drop-shadow(1px 1px 0 black) 
          drop-shadow(-1px -1px 0 black);
}

body {
  background-color: lightcoral;
}
<img src="http://i.imgur.com/GZoXRjS.png" width="250">


from FabricJS Rendering a shadow around active object/selection?

No comments:

Post a Comment