118 lines
18 KiB
JavaScript
118 lines
18 KiB
JavaScript
|
import { CompactType, DirTypes, DisplayGrid, GridType } from './gridsterConfig.interface';
|
||
|
export const GridsterConfigService = {
|
||
|
gridType: GridType.Fit,
|
||
|
scale: 1,
|
||
|
// 'scrollVertical' will fit on width and height of the items will be the same as the width
|
||
|
// 'scrollHorizontal' will fit on height and width of the items will be the same as the height
|
||
|
// 'fixed' will set the rows and columns dimensions based on fixedColWidth and fixedRowHeight options
|
||
|
// 'verticalFixed' will set the rows to fixedRowHeight and columns width will fit the space available
|
||
|
// 'horizontalFixed' will set the columns to fixedColWidth and rows height will fit the space available
|
||
|
fixedColWidth: 250,
|
||
|
fixedRowHeight: 250,
|
||
|
keepFixedHeightInMobile: false,
|
||
|
keepFixedWidthInMobile: false,
|
||
|
setGridSize: false,
|
||
|
compactType: CompactType.None,
|
||
|
mobileBreakpoint: 640,
|
||
|
useBodyForBreakpoint: false,
|
||
|
allowMultiLayer: false,
|
||
|
defaultLayerIndex: 0,
|
||
|
maxLayerIndex: 2,
|
||
|
baseLayerIndex: 1,
|
||
|
minCols: 1,
|
||
|
maxCols: 100,
|
||
|
minRows: 1,
|
||
|
maxRows: 100,
|
||
|
defaultItemCols: 1,
|
||
|
defaultItemRows: 1,
|
||
|
maxItemCols: 50,
|
||
|
maxItemRows: 50,
|
||
|
minItemCols: 1,
|
||
|
minItemRows: 1,
|
||
|
minItemArea: 1,
|
||
|
maxItemArea: 2500,
|
||
|
addEmptyRowsCount: 0,
|
||
|
rowHeightRatio: 1,
|
||
|
margin: 10,
|
||
|
outerMargin: true,
|
||
|
outerMarginTop: null,
|
||
|
outerMarginRight: null,
|
||
|
outerMarginBottom: null,
|
||
|
outerMarginLeft: null,
|
||
|
useTransformPositioning: true,
|
||
|
scrollSensitivity: 10,
|
||
|
scrollSpeed: 20,
|
||
|
initCallback: undefined,
|
||
|
destroyCallback: undefined,
|
||
|
gridSizeChangedCallback: undefined,
|
||
|
itemChangeCallback: undefined,
|
||
|
// Arguments: gridsterItem, gridsterItemComponent
|
||
|
itemResizeCallback: undefined,
|
||
|
// Arguments: gridsterItem, gridsterItemComponent
|
||
|
itemInitCallback: undefined,
|
||
|
// Arguments: gridsterItem, gridsterItemComponent
|
||
|
itemRemovedCallback: undefined,
|
||
|
// Arguments: gridsterItem, gridsterItemComponent
|
||
|
itemValidateCallback: undefined,
|
||
|
// Arguments: gridsterItem
|
||
|
enableEmptyCellClick: false,
|
||
|
enableEmptyCellContextMenu: false,
|
||
|
enableEmptyCellDrop: false,
|
||
|
enableEmptyCellDrag: false,
|
||
|
enableOccupiedCellDrop: false,
|
||
|
emptyCellClickCallback: undefined,
|
||
|
emptyCellContextMenuCallback: undefined,
|
||
|
emptyCellDropCallback: undefined,
|
||
|
emptyCellDragCallback: undefined,
|
||
|
emptyCellDragMaxCols: 50,
|
||
|
emptyCellDragMaxRows: 50,
|
||
|
// Arguments: event, gridsterItem{x, y, rows: defaultItemRows, cols: defaultItemCols}
|
||
|
ignoreMarginInRow: false,
|
||
|
draggable: {
|
||
|
delayStart: 0,
|
||
|
enabled: false,
|
||
|
ignoreContentClass: 'gridster-item-content',
|
||
|
ignoreContent: false,
|
||
|
dragHandleClass: 'drag-handler',
|
||
|
stop: undefined,
|
||
|
start: undefined,
|
||
|
// Arguments: item, gridsterItem, event
|
||
|
dropOverItems: false,
|
||
|
dropOverItemsCallback: undefined // callback on drop over another item
|
||
|
// Arguments: source, target, gridComponent
|
||
|
},
|
||
|
resizable: {
|
||
|
delayStart: 0,
|
||
|
enabled: false,
|
||
|
handles: {
|
||
|
s: true,
|
||
|
e: true,
|
||
|
n: true,
|
||
|
w: true,
|
||
|
se: true,
|
||
|
ne: true,
|
||
|
sw: true,
|
||
|
nw: true
|
||
|
},
|
||
|
stop: undefined,
|
||
|
start: undefined // callback when resizing an item starts.
|
||
|
// Arguments: item, gridsterItem, event
|
||
|
},
|
||
|
swap: true,
|
||
|
swapWhileDragging: false,
|
||
|
pushItems: false,
|
||
|
disablePushOnDrag: false,
|
||
|
disablePushOnResize: false,
|
||
|
pushDirections: { north: true, east: true, south: true, west: true },
|
||
|
pushResizeItems: false,
|
||
|
displayGrid: DisplayGrid.OnDragAndResize,
|
||
|
disableWindowResize: false,
|
||
|
disableWarnings: false,
|
||
|
scrollToNewItems: false,
|
||
|
disableScrollHorizontal: false,
|
||
|
disableScrollVertical: false,
|
||
|
enableBoundaryControl: false,
|
||
|
disableAutoPositionOnConflict: false,
|
||
|
dirType: DirTypes.LTR // page direction, rtl=right to left ltr= left to right, if you use rtl language set dirType to rtl
|
||
|
};
|
||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZHN0ZXJDb25maWcuY29uc3RhbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWdyaWRzdGVyMi9zcmMvbGliL2dyaWRzdGVyQ29uZmlnLmNvbnN0YW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxXQUFXLEVBQ1gsUUFBUSxFQUNSLFdBQVcsRUFFWCxRQUFRLEVBQ1QsTUFBTSw0QkFBNEIsQ0FBQztBQUVwQyxNQUFNLENBQUMsTUFBTSxxQkFBcUIsR0FBbUI7SUFDbkQsUUFBUSxFQUFFLFFBQVEsQ0FBQyxHQUFHO0lBQ3RCLEtBQUssRUFBRSxDQUFDO0lBQ1IsMkZBQTJGO0lBQzNGLDhGQUE4RjtJQUM5RixxR0FBcUc7SUFDckcscUdBQXFHO0lBQ3JHLHVHQUF1RztJQUN2RyxhQUFhLEVBQUUsR0FBRztJQUNsQixjQUFjLEVBQUUsR0FBRztJQUNuQix1QkFBdUIsRUFBRSxLQUFLO0lBQzlCLHNCQUFzQixFQUFFLEtBQUs7SUFDN0IsV0FBVyxFQUFFLEtBQUs7SUFDbEIsV0FBVyxFQUFFLFdBQVcsQ0FBQyxJQ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