fix(zoom): set internal d3 zoom property programmatically closes #347

This commit is contained in:
moklick
2020-07-20 10:40:17 +02:00
parent 85c6e2e15a
commit 3c99d7303d
2 changed files with 20 additions and 8 deletions
+2
View File
@@ -12,3 +12,5 @@ export const getDimensions = (node: HTMLDivElement) => ({
width: node.offsetWidth,
height: node.offsetHeight,
});
export const clamp = (val: number, min: number = 0, max: number = 1): number => Math.min(Math.max(val, min), max);