Class: DefText

algeobra~DefText(params)

Definition of a text object that can be attached at a position and be created from input objects

Constructor

new DefText(params)

Default values
Parameters:
Name Type Description
params Object
Properties
Name Type Description
text String | function Display text or transform function for text
ref Object The point the text is attached to
Source:

Methods

compute(createInfo) → {Object}

Computes the text
Parameters:
Name Type Description
createInfo CreateInfo The creation info
Source:
Returns:
Object of type TYPE_TEXT
Type
Object

(static) fromObjectRef(params) → {CreateInfo}

Creates a new text from an object and a position
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
obj Number | Object <optional>
Either the index or value of an object. The object to be turned into text If no text transformer is used, the object is just converted using the objectToString function
ref Number | Object <optional>
Either the index or value of a TYPE_POINT. The reference point
Source:
Returns:
The creation info
Type
CreateInfo