jstd-web/node_modules/diagram-js/lib/util/PositionUtil.js

14 lines
211 B
JavaScript
Raw Normal View History

2025-11-25 15:23:22 +08:00
export function center(bounds) {
return {
x: bounds.x + (bounds.width / 2),
y: bounds.y + (bounds.height / 2)
};
}
export function delta(a, b) {
return {
x: a.x - b.x,
y: a.y - b.y
};
}