[{"name":"Drag","comment":" This package allows you to make multiple elements draggable simultaneously.\n\n### How it works\n1) You create a single type to represent every possible interaction location.\n``` elm\ntype InteractionLocation\n    = GraphNode Int\n    | Label Int\n```\n2) In your view functions, add an attribute to each element you want to make draggable \n```elm\nviewGraphNode: Int -> Node -> Html Msg\nviewGraphNode key node =\n    div\n        [ Drag.onMouseDownWithOptions\n            { stopPropogation = False, preventDefault = False }\n            (GraphNode key)\n        -- ...\n        ]\n        [ text <| \"Graph Node \" ++ (String.fromInt key) ]\n```\n\n3) In your update, handle the start, movement, and end of a drag as well as\nclicks on an interaction location.\n```elm\n    (Drag.Start location currentMousePosition) as dragMsg ->\n        { model | dragState = Drag.update dragMsg model.dragState }\n\n    (Drag.Moved location currentMousePosition) as dragMsg ->\n        let\n            (dx, dy) = Drag.delta dragMsg model.dragState\n            updatedModel =\n                { model | dragState = Drag.update dragMsg model.dragState }\n        in\n            case location of\n                GraphNode key ->\n                    -- Handle the drag of the node ...\n\n                Label key ->\n                    -- Handle the drag of a label ...\n\n    (Drag.End location currentMousePosition) as dragMsg ->\n        { model | dragState = Drag.update dragMsg model.dragState }\n\n    (Drag.Click location currentMousePosition) as dragMsg ->\n        { model | dragState = Drag.update dragMsg model.dragState }\n    \n```\n4) Add this library's subscriptions to your subscriptions.\n```elm\nsubscriptions : Model -> Sub Msg\nsubscriptions model =\n    Sub.batch\n        [ Drag.subscriptions\n        --, ... your subscriptions\n        ]\n```\n\n@docs State, Msg, onMouseDownWithOptions, subscriptions, update, init, delta\n\n","unions":[{"name":"Msg","comment":" ","args":["interactionLocation"],"cases":[["Start",["interactionLocation","Drag.Position"]],["Moved",["interactionLocation","Drag.Position"]],["End",["interactionLocation","Drag.Position"]],["Click",["interactionLocation","Drag.Position"]]]},{"name":"State","comment":" ","args":["interactionLocation"],"cases":[]}],"aliases":[],"values":[{"name":"delta","comment":" ","type":"Drag.Msg interactionLocation -> Drag.State interactionLocation -> ( Basics.Int, Basics.Int )"},{"name":"init","comment":" ","type":"Drag.State interactionLocation"},{"name":"onMouseDownWithOptions","comment":" ","type":"{ stopPropagation : Basics.Bool, preventDefault : Basics.Bool } -> location -> VirtualDom.Attribute (Drag.Msg location)"},{"name":"subscriptions","comment":" ","type":"Drag.State interactionLocation -> Platform.Sub.Sub (Drag.Msg interactionLocation)"},{"name":"update","comment":" ","type":"Drag.Msg interactionLocation -> Drag.State interactionLocation -> Drag.State interactionLocation"}],"binops":[]}]