Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using center throws an error #17

Closed
brentmiller1973 opened this issue Jun 10, 2014 · 1 comment
Closed

Using center throws an error #17

brentmiller1973 opened this issue Jun 10, 2014 · 1 comment

Comments

@brentmiller1973
Copy link

When you set the center attribute to true, code is throwing an error at this line on completion of a polyline:
var pathWidth = this._path.getBBox().width;
I guess you can't get the width of a path element (it only has coordinates)....so I changed the above line to this and it works now:

//Fix:
var pathWidth = this._path.getBoundingClientRect().width;

@leplatrem
Copy link
Collaborator

Thanks for reporting and providing a fix !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants