HR Molecule

From oWiki

Jump to: navigation, search

Contents


Preference Dialog

File:Hr_pref.png

Attributes

type

string  ( r )
Type of this molecule, 'hr'.

pref.enableWhen

string  ( r, w )
Specifies the event that activates this molecule. Default is 'load'.

pref.disableWhen

string  ( r, w )
Specifies the event that deactivates this molecule. Default is 'none'.

pref.width

string  ( r, w )
Specifies the width of the horizontal rule.

Value Description
auto Default. The modifier calculates the actual width
% Defines the width in % of the parent droplet's width
length Defines the width in px, cm, etc. 

pref.height

string  ( r, w )
Specifies the height of the horizontal rule.

Value Description
auto Default. The modifier calculates the actual height
% Defines the height in % of the parent droplet's height
length Defines the height in px, cm, etc. 

pref.float

string  ( r, w )
Specifies where the horizontal rule will appear in the droplet.

Value Description
left The horizontal rule moves to the left in the droplet
right The horizontal rule moves to the right in the droplet
none Default. The horizontal rule will be displayed just where it occurs in the text 

pref.clear

string  ( r, w )
Specifies the sides of the horizontal rule where other floating elements are not allowed.

Value Description
left No floating elements allowed on the left side
right No floating elements allowed on the right side
both No floating elements allowed on either the left or the right side
none Default. Allows floating elements on both sides

pref.r

int  ( r, w )
Specifies the RED component of the color. Possible values is between 0 to 255.

pref.g

int  ( r, w )
Specifies the GREEN component of the color. Possible values is between 0 to 255.

pref.b

int  ( r, w )
Specifies the BLUE component of the color. Possible values is between 0 to 255.


Methods

show()

show the effects of this molecule.

hide()

hide the effects of this molecule.

refresh()

Force molecule to redraw with the current set of attributes.

clone()

Return: a molecule

Create a clone of this molecule.

attach(droplet)

droplet: a droplet object (e.g. app.box.droplet)

Attach this molecule to a droplet.

detach()

Remove this molecule from its droplet.

deleteMod()

Delete this molecule.

serialize()

Return: string

Serialize this molecule into its JSON representation.
Personal tools