hallelujahdrive/elm-croppie/1.0.1

NOTE: the latest version is 1.0.3

Croppie.Events

type alias Model =
    { cropData : CropData
    , result : String
    }


type Msg
    = GotCropData CropData
    | GotResult String


view =
    Croppie.croppie
        []
        [ id "events-example"
        , onUpdate GotCropData
        , onGet GotCropData
        , onResult GotResult
        ]


update msg model =
    case msg of
        GotCropData cropData ->
            ( { model | cropData = cropData }
            , Cmd.none
            )
        GorResult url ->
            ( { model | result = url }
            , Cmd.none
            )    

Events

onUpdate : (CropData -> msg) -> Attribute msg

Detect update evnents. Update events trigged when a drag or zoom occurs

Receive function callbacks

onGet : (CropData -> msg) -> Attribute msg

Receive get callbacks

onResult : (Result msg -> msg) -> Attribute msg

Receive result callbacks