the function CanvasNode::mergeBoundingBoxes was not preserving the upper bounds
of the original box. This fix seems to do it:
mergeBoundingBoxes : function(bb, bb2) {
var obx = bb[0], oby = bb[1]
//change lower corner
if (bb[0] > bb2[0]) bb[0] = bb2[0]
if (bb[1] > bb2[1]) bb[1] = bb2[1]
//match original upper corner
bb[2] = bb[2] + obx - bb[0]
bb[3] = bb[3] + oby - bb[1]
//compare upper corners
if (bb[2]+bb[0] < bb2[2]+bb2[0]) bb[2] = bb2[2]+bb2[0]-bb[0]
if (bb[3]+bb[1] < bb2[3]+bb2[1]) bb[3] = bb2[3]+bb2[1]-bb[1]
},
Original issue reported on code.google.com by crgod...@gmail.com on 24 Jul 2011 at 4:24
Original issue reported on code.google.com by
crgod...@gmail.com
on 24 Jul 2011 at 4:24