new Layout(container, options)layout.jsline 75
Layout class make layout element and include groups, control item move and set events.
PARAMETERS
Name Type Description container
jQueryHTMLElementstring
Wrapper element or id selector
options
object
PROPERTIES
Name Type Description grouplist
array
The list of group options.
PROPERTIES
Name Type Description id
string
The group id
ratio
[ number ]
The group ratio
items
array
The items that the group includes
PROPERTIES
Name Type Description id
string
The item id
contentId
string
The content id
title
string
The item's title
isClose
[ string ]
Whether the item is closed or not
isDraggable
[ string ]
Whether the item is draggable or not
usageStatistics
Boolean = true|false
send hostname to google analytics default value is true
EXAMPLES
var container = document.getElementById('layout'); var Layout = tui.Layout; // or require('tui-layout'); var instance = new Layout(container, { grouplist: [{ id: 'g1', ratio: 50, items: [{ id: 'item-lifeStyle', contentId: 'lifeStyle', title: 'Life Style Seciton', isClose: false, isDraggable: true }, { id: 'item-calendar', contentId: 'calendar', title: 'Calendar Seciton', isClose: false, isDraggable: true }, { id: 'item-todoList', contentId: 'todoList', title: 'TodoList Seciton', isClose: false, isDraggable: true }] }, { id: 'g2', ratio: 50, items: [{ id: 'item-weather', contentId: 'weather', title: 'Weather Seciton', isClose: false, isDraggable: true }, { id: 'item-news', contentId: 'news', title: 'News Seciton', isClose: true, isDraggable: true }] }] });
Resizable