ComponentOne ASP.NET MVC Controls
ILayout Interface
File
c1.nav.js
Module
c1.nav

Defines the interface for the layout.

We can define the layout by implementing this interface.

Properties

Methods

Properties

activeTile

Gets the active tile.

Type
Tile

definition

Gets or sets the current layout settings as a JSON string.

This property is typically used to persist the layout settings.

Type
any

items

Gets the layout item collection.

Type
ObservableArray

Methods

attachTo

attachTo(dashboard: DashboardLayout): void

Applies this layout to the specified DashboardLayout control.

In this method, the layout is applied to some dashboard. Adds the codes to implement the rendering parts for the layout.

Parameters
Returns
void

detach

detach(): void

Detaches this layout from the DashboardLayout control.

In this method, the resources related will be released. It is often used when applying the new layout. It is called to detach the old layout.

Returns
void

endMove

endMove(movedTile: Tile, endPosition: Point): void

Ends the moving operation and exits the moving mode.

Parameters
  • movedTile: Tile

    The tile to be moved.

  • endPosition: Point

    The position where the tile is moved to.

Returns
void

move

move(movedTile: Tile, position: Point): void

Moves the tile.

Adds the codes in this method to do somethings during moving. For example, creates a special moving icon represeting the moving tile, shows some tips for moving.

Parameters
  • movedTile: Tile

    The tile to be moved.

  • position: Point

    The position of the moving mouse. It is the coordinate within the browser visible area.

Returns
void

refresh

refresh(fullUpdate): void

Refreshes the layout.

When the layout properties are changed, especially the items are updated, this method should be called to redraw the layout.

Parameters
  • fullUpdate:

    Whether to update the layout as well as the content.

Returns
void

remove

remove(removedTile: Tile): boolean

Removes the tile.

Parameters
  • removedTile: Tile

    The tile to be removed.

Returns
boolean

resize

resize(resizedTile: Tile, toPosition: Point): boolean

Resizes the tile.

Adds the codes to implement resizing in this method.

Parameters
  • resizedTile: Tile

    The tile to be resized.

  • toPosition: Point

    The right-bottom position of the tile where it will be resized to.

Returns
boolean

showAll

showAll(): void

Shows all the tiles.

Returns
void

startMove

startMove(movedTile: Tile, startPosition: Point): boolean

Starts to move the tile.

Adds the codes in this method to prepare the moving. For example, saves the start moving position, the moving tile.

Parameters
  • movedTile: Tile

    The tile to be moved.

  • startPosition: Point

    The started position where the tile will be moved from. It is the coordinate within the browser visible area.

Returns
boolean

toggleSize

toggleSize(currentTile: Tile): void

Toggles the size state of the tile.

Adds the codes to implement maximizing and restoring in this method.

Parameters
  • currentTile: Tile

    The tile to be toggled.

Returns
void