PERGOLA LOGO

pergola.Button

System events: YES.

User events and functions: YES.

Examples.

Listed: class properties/methods; prototype properties and methods; instance properties. Prototype properties and methods inherited by the Class superclass are not listed.

class

None

prototype

PROPERTIES

parent

pergola.user.

fill

Defined in pergola.presentationAttributes – string.

"fill-opacity"

0 – string or number.

stroke

Defined in pergola.presentationAttributes – string.

maskFill

Defined in pergola.presentationAttributes – String.

large

Defined in pergola.presentationAttributes – object with width and height properties; represents a preset for large buttons.

small

Defined in pergola.presentationAttributes – object with width and height properties; represents a preset for small buttons.

hasVisualEffects

true – boolean. Hovering effect.

hasTextEffect

true – boolean. Video inverse text effect.

textFill

Defined in pergola.presentationAttributes – color string.

textFillInverse

Defined in pergola.presentationAttributes – color string.

METHODS

handleEvent(evt)

build([object])

this inherits the properties specified in object; prototype properties specified in object are overridden. Creates elements. Returns this.

instance

name

String. If not passed to the constructor, gets a generated XML name (Class).

id

String. The return value of this name.toXML(). This container ID. Used as prefix where other elements' IDs are attributed.

owner

If specified, designates the owner object.

size

If specified, a string with allowed values "small" or "large"; respective presets are applied to this width and this height.

width

Computed number. If shape is specified in the initialization object, this button BBox width.

height

Computed number. If shape is specified in the initialization object, this button BBox height.

container

<g> element.

buttonGroup

<g> element.

mask

If shape is specified in the initialization object, the <element> specified by this shape.element, otherwise <rect> element.

button

If shape is specified in the initialization object, the <element> specified by this shape.element, otherwise <rect> element.

shape

If specified, this shape.element determines the element for this mask and this button. Note: this shape can reference a shape from the shapes library or can be defined on the fly (in the library's format).

text

If specified, object specifying text attributes. The property is reassigned to reference the produced <text> element.

textFill

If specified, the "fill" value for this text.

symbol

If specified, the <g> element returned by pergola.symbol(). See Symbols in tutorial for proper use, definition, and options of the symbol object.

image

If specified, object defining "xlink:href", width, height, and optional x and y properties. Note: this property is overridden after processing to reference the produced <image> element.

quickTip

If specified, reference to library's quick tip (lib/qtips.js) or new pergola.QuickTip instance (as returned by the quickTipFormat() method). See pergola.QuickTip for options.

extra

If specified, object defining extra attributes, specified using SVG vocabulary and grammar, for this button.

ev

If specified (event type string, or array of event type strings), the event type(s) is/are registered on this button, with this.

fn

If specified, callback function for this ev. Must be specified if this ev is specified.