diff --git a/src/components/Link/Link.default.tsx b/src/components/Link/Link.default.tsx
index fcb625f9..086b2985 100644
--- a/src/components/Link/Link.default.tsx
+++ b/src/components/Link/Link.default.tsx
@@ -29,15 +29,16 @@ export const LinkDefault = (props: ILinkDefaultProps) => {
const linkColor: string =
(fromPort.properties && fromPort.properties.linkColor) || 'cornflowerblue'
+ const linkStrokeWidth: string =
+ (fromPort.properties && fromPort.properties.linkStrokeWidth) || '3'
+
const linkProps = {
- config,
points,
linkColor,
- startPos,
- endPos,
+ linkStrokeWidth,
...props,
}
-
+
return config.showArrowHead
?
:
diff --git a/src/components/Link/variants/ArrowLink.tsx b/src/components/Link/variants/ArrowLink.tsx
index e87398b9..9d838c26 100644
--- a/src/components/Link/variants/ArrowLink.tsx
+++ b/src/components/Link/variants/ArrowLink.tsx
@@ -7,6 +7,7 @@ export interface IArrowLinkProps {
link: ILink
config: IConfig
linkColor: string
+ linkStrokeWidth: string
points: string
isHovered: boolean
isSelected: boolean
@@ -22,6 +23,7 @@ export const ArrowLink = ({
link,
config,
linkColor,
+ linkStrokeWidth,
points,
isHovered,
isSelected,
@@ -72,7 +74,7 @@ export const ArrowLink = ({
diff --git a/src/components/Link/variants/RegularLink.tsx b/src/components/Link/variants/RegularLink.tsx
index 646346bc..06750707 100644
--- a/src/components/Link/variants/RegularLink.tsx
+++ b/src/components/Link/variants/RegularLink.tsx
@@ -5,6 +5,7 @@ export interface IRegularLinkProps {
className?: string
points: string
linkColor: string
+ linkStrokeWidth: string
config: IConfig
link: ILink
startPos: IPosition
@@ -20,6 +21,7 @@ export const RegularLink = ({
className,
points,
linkColor,
+ linkStrokeWidth,
config,
link,
startPos,
@@ -43,7 +45,7 @@ export const RegularLink = ({
>
{/* Main line */}
-
+
{/* Thick line to make selection easier */}
{
+ return (
+
+
+
+ )
+}
diff --git a/stories/index.tsx b/stories/index.tsx
index 90061abf..0c9bc771 100644
--- a/stories/index.tsx
+++ b/stories/index.tsx
@@ -12,6 +12,7 @@ import { DragAndDropSidebar } from './DragAndDropSidebar'
import { ExternalReactState } from './ExternalReactState'
import { InternalReactState } from './InternalReactState'
import { LinkColors } from './LinkColors'
+import { LinkStrokeWidths } from './LinkStrokeWidths'
import { NodeReadonly } from './NodeReadonly'
import { LinkWithArrowHead } from './LinkWithArrowHead'
import { ReadonlyMode } from './ReadonlyMode'
@@ -32,6 +33,7 @@ storiesOf('Custom Components', module)
.add('Canvas Outer', CustomCanvasOuterDemo)
.add('Canvas Link', () => )
.add('Link Colors', () => )
+ .add('Link Stroke Widths', () => )
storiesOf('Stress Testing', module).add('default', StressTestDemo)