Moving normalizeBBox to util.js
This commit is contained in:
1 parent
abb5838113
commit
870b2e6ed4
5 files changed
+40
-36
No files matched your search
@@ -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);
|
||||
}
|
||||
Reference in new issue
Block a user