angular-gridster2
Version:
58 lines (57 loc) • 2.69 kB
TypeScript
import { ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core';
import { GridsterConfig } from './gridsterConfig.interface';
import { GridsterGridComponent } from './gridsterGrid.component';
import { GridsterEmptyCell } from './gridsterEmptyCell.service';
import { GridsterCompact } from './gridsterCompact.service';
import { GridsterConfigS } from './gridsterConfigS.interface';
import { GridsterItemS } from './gridsterItemS.interface';
import { GridsterComponentInterface } from './gridster.interface';
import { GridsterItemComponentInterface } from './gridsterItemComponent.interface';
export declare class GridsterComponent implements OnInit, OnChanges, OnDestroy, GridsterComponentInterface {
renderer: Renderer2;
cdRef: ChangeDetectorRef;
options: GridsterConfig;
calculateLayoutDebounce: () => void;
movingItem: GridsterItemS | null;
previewStyle: () => void;
el: any;
$options: GridsterConfigS;
mobile: boolean;
curWidth: number;
curHeight: number;
grid: Array<GridsterItemComponentInterface>;
columns: number;
rows: number;
curColWidth: number;
curRowHeight: number;
windowResize: (() => void) | null;
gridLines: GridsterGridComponent;
dragInProgress: boolean;
emptyCell: GridsterEmptyCell;
compact: GridsterCompact;
constructor(el: ElementRef, renderer: Renderer2, cdRef: ChangeDetectorRef);
static checkCollisionTwoItems(item: GridsterItemS, item2: GridsterItemS): boolean;
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
resize(): void;
setOptions(): void;
optionsChanged(): void;
ngOnDestroy(): void;
onResize(): void;
checkIfToResize(): boolean;
setGridSize(): void;
setGridDimensions(): void;
calculateLayout(): void;
addItem(itemComponent: GridsterItemComponentInterface): void;
removeItem(itemComponent: GridsterItemComponentInterface): void;
checkCollision(item: GridsterItemS): GridsterItemComponentInterface | boolean;
checkGridCollision(item: GridsterItemS): boolean;
findItemWithItem(item: GridsterItemS): GridsterItemComponentInterface | boolean;
findItemsWithItem(item: GridsterItemS): Array<GridsterItemComponentInterface>;
autoPositionItem(itemComponent: GridsterItemComponentInterface): void;
getNextPossiblePosition(newItem: GridsterItemS): boolean;
pixelsToPositionX(x: number, roundingMethod: Function): number;
pixelsToPositionY(y: number, roundingMethod: Function): number;
positionXToPixels(x: number): number;
positionYToPixels(y: number): number;
}