fix(nodes): zoomed dragging

This commit is contained in:
moklick
2019-07-16 13:32:22 +02:00
parent 2cdf0eb179
commit 70ef6bd7dd
2 changed files with 24 additions and 14 deletions
+9 -1
View File
@@ -42,8 +42,16 @@ export const getBoundingBox = (nodes) => {
};
};
export const projectPosition = (pos, transform) => {
return {
x: (pos.x * transform[2]) + transform[0],
y: (pos.y * transform[2]) + transform[1]
};
}
export default {
isEdge,
separateElements,
getBoundingBox
getBoundingBox,
projectPosition
};