fix(defaultViewport): clamp invalid zoom values

This commit is contained in:
moklick
2022-12-12 17:43:33 +01:00
parent 0a2529d26e
commit 9ba39ae49f
4 changed files with 6 additions and 8 deletions
@@ -5,7 +5,6 @@ describe('Figma Flow UI', () => {
it('renders a flow with three nodes', () => {
cy.get('.react-flow__renderer');
cy.get('.react-flow-basic-example'); // check if className prop works
cy.get('.react-flow__node').should('have.length', 4);
cy.get('.react-flow__edge').should('have.length', 2);
cy.get('.react-flow__node').children('.react-flow__handle');
@@ -1,4 +1,4 @@
import ReactFlow, { Background, BackgroundVariant, Node, Edge, SelectionMode } from 'reactflow';
import ReactFlow, { Background, BackgroundVariant, Node, Edge, SelectionMode, Viewport } from 'reactflow';
const MULTI_SELECT_KEY = ['Meta', 'Shift'];