Reference Source
import {Masonry} from '@adobe/coral-spectrum'
public class | source

MasonryColumnLayout

Extends:

MasonryLayout → MasonryColumnLayout

Indirect Subclass:

MasonryDashboardLayout

A Masonry Column layout

See:

Example:

JS constructor
new Coral.Masonry.ColumnLayout();

Constructor Summary

Public Constructor
public

constructor(masonry: Masonry)

Takes a {Masonry} instance as argument.

Method Summary

Public Methods
public
public

detach(item: *)

public

itemAt(x: *, y: *): *

public

layout(secondTry: *)

public

reattach(item: *)

Inherited Summary

From class MasonryLayout
public static

Defines the name of the Layout

public

Layout name.

public

Removes all layout-specific attributes, style, data and event listeners from the masonry and its items.

public

Removes the item from the control of the layout.

public

itemAt(x: number, y: number): Coral.Masonry.Item

Returns the item at the given position.

public

layout()

Lays out the masonry items according to the implementation.

public

Adds the item to the control of the layout again.

Public Constructors

public constructor(masonry: Masonry) source

Takes a {Masonry} instance as argument.

Override:

MasonryLayout#constructor

Params:

NameTypeAttributeDescription
masonry Masonry

Public Methods

public destroy() source

Removes all layout-specific attributes, style, data and event listeners from the masonry and its items.

Override:

MasonryLayout#destroy

public detach(item: *) source

Removes the item from the control of the layout. This can be used to position the item differently, for example for drag&drop.

Override:

MasonryLayout#detach

Params:

NameTypeAttributeDescription
item *

public itemAt(x: *, y: *): * 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.

Override:

MasonryLayout#itemAt

Params:

NameTypeAttributeDescription
x *
y *

Return:

*

public layout(secondTry: *) source

Lays out the masonry items according to the implementation.

Override:

MasonryLayout#layout

Params:

NameTypeAttributeDescription
secondTry *

public reattach(item: *) 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.

Override:

MasonryLayout#reattach

Params:

NameTypeAttributeDescription
item *