From 9a79ea6d503eef54d22facb12f6f8a1565609270 Mon Sep 17 00:00:00 2001 From: Matei Adriel Date: Wed, 6 May 2020 18:09:45 +0300 Subject: [PATCH] fix: fixed a tiny bug which made it so you had to double click to remove connections --- src/Component/Editor/Edge.purs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Component/Editor/Edge.purs b/src/Component/Editor/Edge.purs index 75d5c73..1bde7b9 100644 --- a/src/Component/Editor/Edge.purs +++ b/src/Component/Editor/Edge.purs @@ -11,7 +11,7 @@ import Data.Typelevel.Num (d0, d1) import Data.Vec ((!!)) import Halogen.HTML (ComponentHTML) import Halogen.HTML as HH -import Halogen.HTML.Events (onClick) +import Halogen.HTML.Events (onMouseUp) import Lunarbox.Data.Editor.Constants (connectionsWidth) import Lunarbox.Data.Vector (Vec2) import Lunarbox.Svg.Attributes (strokeDashArray, strokeWidth) @@ -44,7 +44,7 @@ renderEdge' { from, to, color, dotted, className } { handleClick } = , SA.x2 $ floor $ to !! d0 , SA.y2 $ floor $ to !! d1 , SA.stroke $ Just color - , onClick $ const handleClick + , onMouseUp $ const handleClick , strokeWidth connectionsWidth ] <> ( guard dotted