Closed GoogleCodeExporter closed 8 years ago
Forgot to attach file.
Original comment by adamben...@gmail.com
on 28 Mar 2012 at 5:12
Attachments:
I'm sure it's just an oversight on the coder's part. Sometimes it feels
convenient to do if(!x) and ignore the fact that we accept 0 as well.
However in this case the check is unnecessary. From the spec[1] getItem() will
return any of path segment types, all of which should have the attributes x & y.
Fix in r2071.
[1] http://www.w3.org/TR/SVG/paths.html#__svg__SVGPathSegList__getItem
Original comment by asyazwan
on 29 Mar 2012 at 2:47
Im sure you are right, unfortunately in JavaScript it is sometimes a little too
easy to be very broad when it comes to conditionals, which of course cuts both
ways. Thanks for taking a look at this so quickly!
Adam
Original comment by adamben...@gmail.com
on 29 Mar 2012 at 3:18
Revision: r2071 seems to break the path selection box for me. Chrome 17 Linux.
Make a path and then select it. The path selection box has x, y, width & height
as 0.
Original comment by mcdonald...@gmail.com
on 30 Mar 2012 at 12:54
Broken for my Chrome 17 too, but fine with FF 11.
Confirmed that this fix is the cause. Thanks for the report.
Original comment by asyazwan
on 30 Mar 2012 at 2:16
There are actually cases where segment's x/y undefined. My ignorance bites
again...
Applied adam's earlier suggestion and included a unit test for getPathBBox().
Fixed in r2072.
Original comment by asyazwan
on 30 Mar 2012 at 3:55
Original issue reported on code.google.com by
adamben...@gmail.com
on 28 Mar 2012 at 5:10