From 9f3c37be645a96d6073bc42299cefa6afd52d7a4 Mon Sep 17 00:00:00 2001 From: BoykoAlex Date: Mon, 11 Jun 2018 22:50:10 -0400 Subject: [PATCH] Workaround selector issue in JQuery --- src/lib/src/shared/shapes.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/src/shared/shapes.ts b/src/lib/src/shared/shapes.ts index 22ae5f0..9032d24 100644 --- a/src/lib/src/shared/shapes.ts +++ b/src/lib/src/shared/shapes.ts @@ -241,8 +241,10 @@ joint.shapes.flo.ElementView = joint.dia.ElementView.extend({ if ($(evt.target).attr('port') === 'input') { sourceEnd = { x: x, y: y }; targetEnd = this.getLinkEnd(magnet, x, y, link, 'target'); + targetEnd.selector = magnet.getAttribute('class').split(' ').map((cls: string) => '.' + cls).join(' '); } else { sourceEnd = this.getLinkEnd(magnet, x, y, link, 'source'); + sourceEnd.selector = magnet.getAttribute('class').split(' ').map((cls: string) => '.' + cls).join(' '); targetEnd = { x: x, y: y }; }