TypefiElementVariantDefinition

Typefi element variant definition

Methods:

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

Objects:

Boolean, EventListeners, Events, Layer, Number, Object, String, TypefiFloatSpacingType, TypefiPageType,

Property Listing

Property

Type

Access

Description

eventListeners

EventListeners EventListener

readonly

A collection of event listeners.

events

Events Event

readonly

A collection of events.

floatSpacingType

TypefiFloatSpacingType

TypefiFloatSpacingType.IGNORE

TypefiFloatSpacingType.USE

TypefiFloatSpacingType.USE_SAME

read/write

Float spacing type

floatingLayer

Layer

String

LongInteger

read/write

Floating layer. Can return: Layer, String or Long Integer.

id

Number

readonly

The unique ID of the TypefiElementVariantDefinition.

index

Number

readonly

The index of the TypefiElementVariantDefinition within its containing 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.

labels

Array of String

read/write

Labels

minimalFloatingDistances

Array of Number

read/write

Minimal floating distances

name

String

read/write

The name of the TypefiElementVariantDefinition.

pageType

TypefiPageType

TypefiPageType.ANY_SIDE

TypefiPageType.BOTH_SIDES

TypefiPageType.INNER_SIDE

TypefiPageType.LEFT_SIDE

TypefiPageType.NONE

TypefiPageType.RIGHT_SIDE

read/write

Page type

parent

TypefiElementDefinition

readonly

The parent of the TypefiElementVariantDefinition (a TypefiElementDefinition).

properties

Object

read/write

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

variantId

Number

read/write

Variant id

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)

undefined apply (pageItem:PageItem)

Applies an element variant to page item

Parameter

Type

Description

pageItem

PageItem

The page item that needs to be assigned the element type

String extractLabel (key:String)

Gets the label value associated with the specified key.

Parameter

Type

Description

key

String

The key.

TypefiElementVariantDefinition 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.

undefined remove ()

Deletes the TypefiElementVariantDefinition.

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 TypefiElementVariantDefinition.

String toSpecifier ()

Retrieves the object specifier.

Object of

TypefiElementPageItem.variantDefinition

Event.parent

EventListener.parent

MutationEvent.parent

Return

TypefiElementDefinition.apply()

TypefiElementVariantDefinitions.add()

TypefiElementVariantDefinition.getElements()

TypefiElementVariantDefinitions.anyItem()

TypefiElementVariantDefinitions.everyItem()

TypefiElementVariantDefinitions.nextItem()

TypefiElementVariantDefinitions.previousItem()

TypefiElementVariantDefinitions.itemByID()

TypefiElementVariantDefinitions.item()

TypefiElementVariantDefinitions.[]()

TypefiElementVariantDefinitions.itemByName()

TypefiElementVariantDefinitions.itemByRange()

TypefiElementVariantDefinitions.firstItem()

TypefiElementVariantDefinitions.lastItem()

TypefiElementVariantDefinitions.middleItem()