Overlays.Label Class
Provides a text label with which to decorate Connectors or Endpoints. For all different renderer types (SVG/Canvas/VML), jsPlumb draws a Label overlay as a styled DIV. You can style a Label
using the cssClass
parameter, or - if you need to programmatically generate the appearance - the labelStyle
parameter.
Constructor
Overlays.Label
-
params
-
label
-
[cssClass]
-
[location=0.5]
-
[labelStyle]
Parameters:
-
params
ObjectConstructor parameters
-
label
String | Function- The text to display. You can provide a function here instead of plain text: it is passed the component as an argument, and it should return a String.
-
[cssClass]
String optionalOptional css class to use for the Label.
-
[location=0.5]
Float optionalWhere, either as a proportional value from 0 to 1 inclusive, or as an absolute value (negative values mean distance from target; positive values greater than 1 mean distance from source) the Label should appear on the Connector
-
[labelStyle]
Object optionalOptional object containing properties for the label's style. Use this if you need to prgrammatically generate the label's appearance.
-
[cssClass]
String optionalcss class for the label (you can also use the
cssClass
parameter on the label; this exists for historical reasons) -
[font]
String optionalA string specifying a font to use, in valid CSS format.
-
[color]
String optionalA string specifying a font color to use, in valid CSS format.
-
[fillStyle]
String optionalA string specifying the background for the label, in valid CSS format.
-
[borderStyle]
String optionalA string specifying the border color for the label, in valid CSS format.
-
[borderWidth]
Integer optionalWidth of the border's label
-
[padding]
Integer optionalPadding for the label.
-