fabiommendes/elm-svg-editor/2.1.0

Svg.Editor.Config

Global application configuration

type alias Config =
Config

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.

editable : Bool -> Config -> Config

Control if editor is editable or not.

shape : ( Float, Float ) -> Config -> Config

Initial shape, (width, height), of the viewing area.

Scale is in meters.

readOnly : Bool -> Config -> Config

Initialize editor in a read-only state if boolean is true.