feat(node): handle nodrag class

This commit is contained in:
moklick
2019-10-24 14:48:35 +02:00
parent 70ab31b993
commit 5030f7dc1b
8 changed files with 24 additions and 84 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
import React, { memo, MouseEvent, ComponentType } from 'react';
import React, { memo, ComponentType } from 'react';
import cx from 'classnames';
import { isInputDOMNode } from '../../utils';
import store from '../../store';
import { ElementId, Edge, EdgeCompProps } from '../../types';
@@ -20,8 +19,8 @@ export default (EdgeComponent: ComponentType<EdgeCompProps>) => {
const EdgeWrapper = memo(
({ id, source, target, type, animated, selected, onClick, isInteractive, ...rest }: EdgeWrapperProps) => {
const edgeClasses = cx('react-flow__edge', { selected, animated });
const onEdgeClick = (evt: MouseEvent): void => {
if (isInputDOMNode(evt) || !isInteractive) {
const onEdgeClick = (): void => {
if (!isInteractive) {
return;
}