Simplify workspace.getBlocksBoundingBox

Previously it returned x,y,width,height.  Returning top,bottom,left,right results in simpler code, both in this function and in downstream callers.

This commit makes the minumum change to the metrics_test.  I’m happy to change the test’s data if that makes more sense.
This commit is contained in:
Neil Fraser
2019-06-06 21:59:37 -07:00
committed by Neil Fraser
parent a9fdf7844a
commit 775ce34eac
5 changed files with 25 additions and 32 deletions

View File

@@ -34,10 +34,10 @@ function makeMockWs(scale, x, y, width, height) {
return {
getBlocksBoundingBox: function() {
return {
width: width,
height: height,
x: x,
y: y
top: y,
bottom: y + height,
left: x,
right: x + width
}
},
scale: scale