New issue 64 by yobert: I think the BB is computing wrong
http://code.google.com/p/canviz/issues/detail?id=64
I was just looking through the source and it looks like there is a bug
where it computes the bounding box in canviz.js line 398. I've attached a
patch for your review...
Attachments:
canviz_bb_fix.patch 533 bytes
No, the code is correct as written. The parameters to the Rect function, as
seen in path.js, are left, top, right, bottom. In canvas coordinate space,
zero is at the top and coordinates increase as you go down, but in Graphviz
coordinate space, zero is at the bottom and coordinates increase as you go
up. That's why the second and fourth parameters (top and bottom,
respectively) have the Graphviz coordinate subtracted from the height of
the canvas -- to invert them.
What makes you think the code is incorrect?
Oh, I understand! Sorry about that, it just looked like a typo at first
glance. I should have dug deeper before submitting a report!
Comment #3 on issue 64 by ryandesi...@gmail.com: I think the BB is
computing wrong
http://code.google.com/p/canviz/issues/detail?id=64
(No comment was entered for this change.)