mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-11-27 17:34:08 +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
|
-> case afterDrag of
|
||||||
Just docUpdate -> strokes . documentContent $ newDocument docUpdate
|
Just docUpdate -> strokes . documentContent $ newDocument docUpdate
|
||||||
_ -> strokes content
|
_ -> strokes content
|
||||||
| Just ( PartialPath p0 cp0 anchor _ ) <- mbPartialPath
|
| Just ( PartialPath p0 cp0 anchor firstPoint ) <- mbPartialPath
|
||||||
, let
|
, let
|
||||||
mbFinalPoint :: Maybe ( Point2D Double )
|
mbFinalPoint :: Maybe ( Point2D Double )
|
||||||
mbControlPoint :: Maybe ( Point2D Double )
|
mbControlPoint :: Maybe ( Point2D Double )
|
||||||
( mbFinalPoint, mbControlPoint )
|
( mbFinalPoint, mbControlPoint )
|
||||||
| Just ( DrawHold holdPos ) <- mbHoldEvent
|
| 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
|
| otherwise
|
||||||
= ( mbMousePos, Nothing )
|
= ( mbMousePos, Nothing )
|
||||||
, Just finalPoint <- mbFinalPoint
|
, Just finalPoint <- mbFinalPoint
|
||||||
|
|
Loading…
Reference in a new issue