Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Team

My Question is when i add svg on canvas then i shift position of this object.
no problem but when i generate output then object is not same position.
some case of svg this fun is call 1 times and some case it more times
toSVG: function(reviver) {
console.log("svg 15789");
var chunks = [],
markup = this._createBaseSVGMarkup();

for (var i = 0, len = this.path.length; i < len; i++) {
chunks.push(this.path[i].join(' '));
}
var path = chunks.join(' ');

markup.push(
'<g transform="', (this.group ? '' : this.getSvgTransform()), '">',
'<path d="', path,<br mode=" hold=" /> '" style="', this.getSvgStyles(),<br mode=" transform="translate(', (-this.width / 2), ' ', (-this.height/2), ')',<br mode=" stroke-linecap="round">',
''
);

return reviver ? reviver(markup.join('')) : markup.join('');
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900