Skip to content

Problem when sharing dropShadow definitions across different SVG elements #10

@cordesmj

Description

@cordesmj

I had a problem when I used the same dropShadow definition in two different SVG elements in two different DIVs. When I try hiding one of the DIVs (using $().fadeOut() or similar), it messed up the element in the other DIV using the same definition (in my case, a PATH element).

I found I was able to work around this by tweaking the dropShadow signature so that I could pass in the id of the element containing the SVG element. This id gets appended to the filter id definition in the plugin:

fltr.id = "dropShadow_" + (""+size + " " + offsetX + " " + offsetY + " " + opacity + " " + id).hashCode();

This results in a separate filter definition for each container, which seemed to fix the problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions