goolord / elm-cropper / Cropper.Types

Types

Types


type alias CropData =
{ url : String
, size : Rect
, crop : Rect
, resized : Rect
, origin : Point 
}

crop data


type alias Drag =
{ start : Position
, current : Position 
}

filling out these docs is a drag


type alias Image =
{ src : String
, width : Basics.Int
, height : Basics.Int 
}

image object


type alias ImageData =
{ url : String
, crop : Rect 
}

image data


type alias Model =
{ url : String
, crop : Rect
, image : Maybe Image
, boundingClientRect : Rectangle
, pivot : Vector
, zoom : Basics.Float
, drag : Maybe Drag 
}

mobel


type alias Point =
{ x : Basics.Int, y : Basics.Int }

point. x, y, all that business


type alias Position =
{ x : Basics.Int, y : Basics.Int }

pozition


type alias Rect =
{ width : Basics.Int
, height : Basics.Int 
}

Rectangle..... TWO!!!!!!!!


type alias Rectangle =
DOM.Rectangle

grectangle


type alias Vector =
{ x : Basics.Float, y : Basics.Float }

vegtor

decodeImage : Json.Decode.Decoder Image

decode image object