MasonryLayout
Direct Subclass:
Indirect Subclass:
Base class for masonry layouts.
Whenever a change is detected, the Coral.Masonry.Layout#layout method is called. This method must then ensure that all the items are positioned correctly.
Layout-specific keyboard support must be handled by adding event listeners to the masonry in the constructor. Such event listeners must be removed in the Coral.Masonry.Layout#destroy method.
Example:
new Coral.Masonry.Layout();
Static Method Summary
Static Public Methods | ||
public static |
defineName(name: String) Defines the name of the Layout |
Constructor Summary
Public Constructor | ||
public |
constructor(arg1: number, arg2: string[]) this is constructor description. |
Method Summary
Public Methods | ||
public |
destroy() Removes all layout-specific attributes, style, data and event listeners from the masonry and its items. |
|
public |
detach(item: MasonryItem) Removes the item from the control of the layout. |
|
public |
Returns the item at the given position. |
|
public |
layout() Lays out the masonry items according to the implementation. |
|
public |
reattach(item: MasonryItem) Adds the item to the control of the layout again. |
Static Public Methods
Public Constructors
Public Members
Public Methods
public destroy() source
Removes all layout-specific attributes, style, data and event listeners from the masonry and its items.
public detach(item: MasonryItem) source
Removes the item from the control of the layout. This can be used to position the item differently, for example for drag&drop.
Params:
Name | Type | Attribute | Description |
item | MasonryItem |
public itemAt(x: number, y: number): Coral.Masonry.Item source
Returns the item at the given position. The position coordinates are relative to the masonry.
If an item is being transitioned when this method is called, then it must choose the item based on the final instead of the current position.
Return:
Coral.Masonry.Item (nullable: true) |
public reattach(item: MasonryItem) source
Adds the item to the control of the layout again. The layout has to ensure that the item will be transitioned to its normal position flawlessly.
Params:
Name | Type | Attribute | Description |
item | MasonryItem |