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

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "react-flow-renderer",
"version": "4.4.0",
"version": "4.7.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

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",

View File

@@ -141,9 +141,6 @@ const GraphView = ({
updateDimensions();
window.onresize = updateDimensions;
if (onConnect) {
setOnConnect(onConnect);
}
if (rendererNode.current) {
resizeObserver = new ResizeObserver((entries) => {
@@ -199,6 +196,12 @@ const GraphView = ({
}
}
}, [d3Initialised, onLoad]);
useEffect(() => {
if (onConnect) {
setOnConnect(onConnect);
}
}, [onConnect]);
useEffect(() => {
setSnapGrid({ snapToGrid, snapGrid });