MathObject

A math object.

Methods:

addEventListener, extractLabel, getElements, insertLabel, removeEventListener, toSource, toSpecifier

Objects:

Boolean, EventListeners, Events, Number, Object, String, Swatch,

Property Listing

Property

Type

Access

Description

appliedMathMLFontSize

Number

read/write

The font size (in points) for Math objects

appliedMathMLRgbColor

Array of Number

read/write

RGB Color applied on the math object specified in 0-255 range.

appliedMathMLSwatch

Swatch

NothingEnumCanalsoaccept:String

read/write

The swatch used for math object color. Also accepts swatch name.(RGB, CMYK, LAB and HSB swatches supported.). Can return: Swatch or NothingEnum enumerator. Can also accept: String.

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

id

Number

readonly

The unique ID of the MathObject.

index

Number

readonly

The index of the MathObject within its containing object.

isMathMLObject

Boolean

readonly

Is the SVG Object a MathML object.

isValid

Boolean

readonly

Returns true if the object specifier resolves to valid objects.

label

String

read/write

A property that can be set to any string.

mathmlDescription

String

read/write

MathML Description of the SVG Object. Returns empty string if not a MathML Object.

name

String

read/write

The name of the MathObject; this is an alias to the MathObject's label property.

parent

Rectangle

readonly

The parent of the MathObject (a Rectangle).

properties

Object

read/write

A property that allows setting of several properties at the same time.

tintValue

Number (range 0 - 100)

read/write

The percent of the base color. (Range: 0 to 100)

Constants/Events

Name

Type

Access

Description

AFTER_PLACE

String

readonly

Dispatched after a MathObject is placed. This event bubbles. This event is not cancelable.

BEFORE_PLACE

String

readonly

Dispatched before a MathObject is placed. This event bubbles. This event is cancelable.

Method Listing

EventListener addEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Adds an event listener.

Parameter

Type

Description

eventType

String

The event type.

handler

File

JavaScriptFunction

The event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

MathObject getElements ()

Resolves the object specifier, creating an array of object references.

undefined insertLabel (key:String, value:String)

Sets the label to the value associated with the specified key.

Parameter

Type

Description

key

String

The key.

value

String

The value.

Boolean removeEventListener (eventType:String, handler:Varies File JavaScriptFunction, [captures:Boolean=Boolean])

Removes the event listener.

Parameter

Type

Description

eventType

String

The registered event type.

handler

File

JavaScriptFunction

The registered event handler. Can accept: File or JavaScript Function.

captures

Boolean

This parameter is obsolete. (Optional)

(default: false)

String toSource ()

Generates a string which, if executed, will return the MathObject.

String toSpecifier ()

Retrieves the object specifier.

Object of

Event.parent

EventListener.parent

MutationEvent.parent

Return

MathObjects.add()

MathObject.getElements()

MathObjects.anyItem()

MathObjects.everyItem()

MathObjects.nextItem()

MathObjects.previousItem()

MathObjects.itemByID()

MathObjects.item()

MathObjects.[]()

MathObjects.itemByName()

MathObjects.itemByRange()

MathObjects.firstItem()

MathObjects.lastItem()

MathObjects.middleItem()