refacor(graphview): cleanup

This commit is contained in:
moklick
2020-08-02 18:55:15 +02:00
parent f6f3202b57
commit e0a2ceeab0
2 changed files with 16 additions and 21 deletions
+3 -3
View File
@@ -7,8 +7,6 @@ import MarkerDefinitions from './MarkerDefinitions';
import { XYPosition, Position, Edge, Node, ElementId, HandleElement, Elements, ConnectionLineType } from '../../types';
interface EdgeRendererProps {
width: number;
height: number;
edgeTypes: any;
connectionLineType: ConnectionLineType;
connectionLineStyle?: CSSProperties;
@@ -203,8 +201,10 @@ const EdgeRenderer = (props: EdgeRendererProps) => {
const selectedElements = useStoreState((s) => s.selectedElements);
const nodesConnectable = useStoreState((s) => s.nodesConnectable);
const elementsSelectable = useStoreState((s) => s.elementsSelectable);
const width = useStoreState((state) => state.width);
const height = useStoreState((state) => state.height);
const { width, height, connectionLineStyle, connectionLineType, arrowHeadColor } = props;
const { connectionLineStyle, connectionLineType, arrowHeadColor } = props;
if (!width) {
return null;