diff --git a/src/components/Link/Link.default.tsx b/src/components/Link/Link.default.tsx index fcb625f9..72fadadb 100644 --- a/src/components/Link/Link.default.tsx +++ b/src/components/Link/Link.default.tsx @@ -29,12 +29,15 @@ export const LinkDefault = (props: ILinkDefaultProps) => { const linkColor: string = (fromPort.properties && fromPort.properties.linkColor) || 'cornflowerblue' + const className = toPort ? 'react-flow-chart__link--placed' : 'react-flow-chart__link--dragging' + const linkProps = { config, points, linkColor, startPos, endPos, + className, ...props, } diff --git a/src/components/Port/Port.wrapper.tsx b/src/components/Port/Port.wrapper.tsx index 89d0d990..a4eb14b6 100644 --- a/src/components/Port/Port.wrapper.tsx +++ b/src/components/Port/Port.wrapper.tsx @@ -65,7 +65,8 @@ export class PortWrapper extends React.Component { // Create the move handler // This will update the position as the mouse moves const mouseMoveHandler = (e: MouseEvent) => { - const { offsetX, offsetY, zoomScale } = this.context + const { offsetX, offsetY } = this.context + const zoomScale = this.context.zoomScale || 1 onLinkMove({ config,