Merge branch 'master' into develop

This commit is contained in:
Moritz
2020-07-28 09:41:07 +02:00
committed by GitHub
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-flow-renderer",
"version": "4.4.0",
"version": "4.7.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "react-flow-renderer",
"version": "4.4.0",
"version": "4.7.0",
"main": "dist/ReactFlow.js",
"module": "dist/ReactFlow.esm.js",
"types": "dist/index.d.ts",
+6 -3
View File
@@ -141,9 +141,6 @@ const GraphView = ({
updateDimensions();
window.onresize = updateDimensions;
if (onConnect) {
setOnConnect(onConnect);
}
if (rendererNode.current) {
resizeObserver = new ResizeObserver((entries) => {
@@ -200,6 +197,12 @@ const GraphView = ({
}
}, [d3Initialised, onLoad]);
useEffect(() => {
if (onConnect) {
setOnConnect(onConnect);
}
}, [onConnect]);
useEffect(() => {
setSnapGrid({ snapToGrid, snapGrid });
}, [snapToGrid]);