fabiommendes/elm-svg-editor/1.0.0

NOTE: the latest version is 2.1.0

Svg.Editor.Config

Global application configuration

type alias Config =
{ pointRadius : Float
, zoomControls : Bool
, panControls : Bool
, panWithTouch : Bool
, groups : List Label
, sceneId : String
, drag : Config ( Key, SubKey ) Msg
}

The config object. Usually should be created using init or the config utilitiy function

init : Config

Default config

Custom config

config : List (Config -> Config) -> Config

Create a custom config from a list of properties, e.g.

config
    [ groups [ "routes", "rock-faces", "elements" ]
    , pointRadius 2
    , controls { zoom = False, pan = True, drag = False }
    ]
{ zoom : Bool
, pan : Bool
, drag : Bool
}
-> Config
-> Config

Enable/disable zoom and pan controls in the UI

groups : List Label -> Config -> Config

List of allowed groups in scene.

Each element can be in at most a single group and have a unique index in that group.

This is useful, for instance, to mark routes or other highlights on the topo map and have numbers identifying each element.

pointRadius : Float -> Config -> Config

Radius of points, when rendered as circles.

sceneId : String -> Config -> Config

Change the default scene id.

This is necessary if two scenes are present in the same screen. Each scene must have a unique id.