Closed ghost closed 10 years ago
done. should probably do the same for demo page at: http://valleybazaar.org/#tracebox as well as example page https://github.com/yunap/traceit/blob/master/examples/index.html
Check the indents in a code block after "The trace constructor accepts the following traceOpt options object."
hmm, in "#example2"? it is an output of http://jsbeautifier.org/
Like this (too lazy for pull request):
$('#example2').trace({
traceOpt: {
traceCanvasPadding: 10,
redrawSpeed: 3500,
traceDivPref: "_wrap",
traceCursor: 'pointer',
traceOpt: {
'stroke': 'yellow',
'stroke-width': 5,
'stroke-opacity': 1,
'fill': 'none',
'fill-opacity': 0,
'zindex': 9999
},
isVisible: true,
// will position relative to the document by default
useRelativePositioning: false,
onHide: function () {
console.log("onHide callback was invoked.")
},
onEndTrace: function () {
console.log("onEndTrace callback was invoked.")
},
onClick: function (me) {
me.options.shape.animate({
opacity: 0
}, 1000, function () {
me.hideTrace();
});
}
}
);
Sync it to actual code, and fix code formatting. Just for looks!