From 6cf4e3fe9b5eacf446b16e47c9a689a08ff95a0e Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Thu, 16 Apr 2015 17:10:30 -0400 Subject: [PATCH] Tweaking normalizeBBox Using defaults instead of extend seems to more clearly illustrate the intent. --- src/js/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/util.js b/src/js/util.js index aebaf14..c0e22cd 100644 --- a/src/js/util.js +++ b/src/js/util.js @@ -22,11 +22,11 @@ function customEvent(name, detail) { // - __box__ - Bounding box object to update. Attributes `ax`, `ax2`, and `ay` // will be added if they are not already defined. function normalizeBBox(box) { - return _.extend({ + return _.defaults(box, { ax: box.x, ax2: box.x2, ay: box.cy - }, box); + }); } // Positions a collection of items with their axis points aligned along a