Moving normalizeBBox to util.js

This commit is contained in:
Jeff Avallone committed 2014-12-19 12:06:21 -05:00
1 parent abb5838113
commit 870b2e6ed4
5 files changed
+40 -36

No files matched your search

+11
View File
@@ -1,6 +1,17 @@
import _ from 'lodash';
export function customEvent(name, detail) {
var evt = document.createEvent('Event');
evt.initEvent(name, true, true);
evt.detail = detail;
return evt;
}
export function normalizeBBox(box) {
return _.extend({
ax: box.x,
ax2: box.x2,
ay: box.cy
}, box);
}