Snap.svg paper object

I play Snap.svg. I do not want to sound really noobish, but I do not get the following example in the API documents;

var f = paper.filter(Snap.filter.blur(5, 10)),
    c = paper.circle(10, 10, 10).attr({
        filter: f
    });

I am looking in the documents for a copy of the paper or even where it relates. I try to get a blurry path when paired. see the following example;

        var paper = Snap.select("#icon-parent"),
            icon = Snap.select("#x-mark-icon"),
            f = paper.filter(Snap.filter.blur(5, 10));
        icon.hover(function(event) {
            this.animate({
                transform : "t110,150",
                filter: f 
            }, 200, mina.easeout);


        }, function(event) {
            this.animate({
                transform : "t0,0"
            }, 200, mina.easeout);
        });

This is the Iconmonstr icon;

<svg id="icon-parent" xml:space="preserve" enable-background="new 0 0 512 512" viewBox="0 0 512 512" height="40px" width="40px" y="0px" x="0px" xmlns="http://www.w3.org/2000/svg" version="1.1">
    <path d="M256,50C142.229,50,50,142.229,50,256s92.229,206,206,206s206-92.229,206-206S369.771,50,256,50z M334.124,378.545l-77.122-77.117l-77.123,77.127l-41.425-41.449l77.106-77.117l-77.115-77.11l41.448-41.424l77.103,77.092 l77.09-77.102l41.459,41.432l-77.104,77.108l77.113,77.102L334.124,378.545z" id="x-mark-icon"/>
</svg>
+4
source share
1 answer

, , . , . , , , . 2- / svg , , , , . / svg , .

icon.hover(function (event) {
    this.attr({ filter: f });
    this.animate({
        transform: "t10,10",    
    }, 200, mina.easeout);
...

http://jsfiddle.net/pcAZT/11/

0

All Articles