import { FLOWDESIGNER_FLOW_ADD_ELEMENTS , FLOWDESIGNER_FLOW_RESET , FLOWDESIGNER_FLOW_LOAD , FLOWDESIGNER_FLOW_SET_ZOOM , FLOWDESIGNER_FLOW_ZOOM_IN , FLOWDESIGNER_FLOW_ZOOM_OUT , } from '../constants/flowdesigner.constants' ; params export const addFlowElements = ( listOfActionCreation ) => ( { type : FLOWDESIGNER_FLOW_ADD_ELEMENTS , listOfActionCreation , } ) ; /**
 * ask for flow reset, emptying, nodes, links, ports collections
 */ export const resetFlow = ( ) => ( { type : FLOWDESIGNER_FLOW_RESET , } ) ; /**
 * reset old flow, load elements for the new flow
 */ export const loadFlow = ( listOfActionCreation ) => ( { type : FLOWDESIGNER_FLOW_LOAD , listOfActionCreation , } ) ; export function setZoom ( transform ) { if ( ! isNaN ( transform . k ) && ! isNaN ( transform . x ) && ! isNaN ( transform . y ) ) { return { type : FLOWDESIGNER_FLOW_SET_ZOOM , transform , } ; } return null ; } export function zoomIn ( scale ) { return { type : FLOWDESIGNER_FLOW_ZOOM_IN , scale , } ; } export function zoomOut ( scale ) { return { type : FLOWDESIGNER_FLOW_ZOOM_OUT , scale , } ; }