Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 662 Bytes

File metadata and controls

33 lines (22 loc) · 662 Bytes

Adds a drop shadow filter to the svg document.

Based on Raphael Blur Plugin

#Usage example:

For each element:

Use raphael.dropshadow.js

el.dropShadow(2, 3, 3, 0.5); // dropShadow(size, offsetX, offsetY, opacity = 1)

For sets:

Use raphael.dropshadow.js

set.dropShadow(2, 3, 3, 0.5);

For styling with CSS:

Use raphael.dropshadow.filter.js

Code:

paper.addDropShadowFilter(2, 3, 3, 0.5);
...
el.node.setAttribute("class", "dropshadow");

CSS:

.dropshadow {
  filter: url(#dropshadow);
}