From 59e07da450d804b32b041289495922d7950204c6 Mon Sep 17 00:00:00 2001 From: sezanzeb Date: Wed, 24 Jun 2020 20:24:41 +0200 Subject: [PATCH] link-state and zoom undefined fix --- src/components/Link/Link.default.tsx | 5 ++++- src/components/Port/Port.wrapper.tsx | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Link/Link.default.tsx b/src/components/Link/Link.default.tsx index e2883b1e..ad21c8a1 100644 --- a/src/components/Link/Link.default.tsx +++ b/src/components/Link/Link.default.tsx @@ -38,7 +38,10 @@ export const LinkDefault = ({ const linkColor: string = (fromPort.properties && fromPort.properties.linkColor) || 'cornflowerblue' return ( - + { // 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,