You can configure a line control suite that consists of a line weight stepper, curve option button, style selector, and solid color padding box.

Fields

FieldDescriptionTypeRequiredRemarks
nameThe name of the control.stringYesNone
typeThe type of the control.stringYesNone
defaultThe default value.stringNoIf this field is not specified, it is left empty.
componentsThe controls in the suite.arrayYesThe default value is ["width","curve","style","color"]. You can configure "width", "curve", "style", and "color".
enableHideSpecifies whether to hide controls on the canvas.booleanNoThe default value is false. If this field is set to true, a show or hide icon appears, and the show field is added.

Values

ConditionData typeExampleDefault value
The enableHide field is not configured or is set to false.object
{
 "width": 4,
 "curve": "smooth",
 "style": "solid",
 "color": "#00f"
}
{
 "width": 1,
 "curve": "polyline",
 "style": "solid",
 "color": "#fff"
}
The enableHide field is set to true.object
{
 "width": 4,
 "curve": "smooth",
 "style": "solid",
 "color": "#00f",
 "show": true
}
{
 "width": 1,
 "curve": "polyline",
 "style": "solid",
 "color": "#fff",
 "show": true
}

Sample configurations

  • The enableHide field is not configuredConfiguration example 1
    "line": {
        "name": "Line Suite",
        "type": "line"
    }
  • The enableHide field is set to trueConfiguration example 2
    "line": {
        "name": "Line Suite",
        "type": "line",
        "enableHide": true
    }
  • The components field is configuredConfiguration example 3
    "line": {
        "name": "Line Suite",
        "type": "line",
        "enableHide": true,
        "components": [
          "style",
          "color"
        ]
    }