merri-ment/lazy-line-painter

Please explain "overrideKey" attribute

Closed this issue · 3 comments

GBKS commented

Thanks for this great plugin. Could you please provide a better description and example of the "overrideKey" attribute. I can't make sense of "Set this property if you selector id doesn't match the key referencing your path data value within svgData".

var pathObj = {
    "svg-holder": { // key referencing your path data value 
        "strokepath": [
            {
                "path": "M94.67,26.776L47.335,69.38L0,26.776l1.338-1.486l45.997,41.396L93.332,25.29L94.67,26.776z",
                "duration": 600
            }
        ],
        "dimensions": {
            "width": 95,
            "height": 95
        }
    }
}; 

@GBKS Consider the above code. if the div where you want to have the svg displayed does not have the id svg-holder as given above, then you can use the overrideKey attribute to define your selector id

GBKS commented

Makes sense now. Thank you.

@GBKS Your welcome .. :) and please don't open an 'issue' for your doubts ...