mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-11-23 15:34:06 +00:00
fix preview for first curve in path
This commit is contained in:
parent
c6694e4e2f
commit
5e62937f16
|
@ -198,13 +198,15 @@ getDocumentRender
|
|||
-> case afterDrag of
|
||||
Just docUpdate -> strokes . documentContent $ newDocument docUpdate
|
||||
_ -> strokes content
|
||||
| Just ( PartialPath p0 cp0 anchor _ ) <- mbPartialPath
|
||||
| Just ( PartialPath p0 cp0 anchor firstPoint ) <- mbPartialPath
|
||||
, let
|
||||
mbFinalPoint :: Maybe ( Point2D Double )
|
||||
mbControlPoint :: Maybe ( Point2D Double )
|
||||
( mbFinalPoint, mbControlPoint )
|
||||
| Just ( DrawHold holdPos ) <- mbHoldEvent
|
||||
= ( Just holdPos, ( \ cp -> ( cp --> holdPos :: Vector2D Double ) • holdPos ) <$> mbMousePos )
|
||||
= if firstPoint
|
||||
then ( mbMousePos , Just holdPos )
|
||||
else ( Just holdPos, ( \ cp -> ( cp --> holdPos :: Vector2D Double ) • holdPos ) <$> mbMousePos )
|
||||
| otherwise
|
||||
= ( mbMousePos, Nothing )
|
||||
, Just finalPoint <- mbFinalPoint
|
||||
|
|
Loading…
Reference in a new issue