UNPKG

angular-gridster2

Version:
59 lines (58 loc) 2.69 kB
import { ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges } from '@angular/core'; import { GridsterConfig } from './gridsterConfig.interface'; import { GridsterItemComponent } from './gridsterItem.component'; 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'; export declare class GridsterComponent implements OnInit, OnChanges, OnDestroy, GridsterComponentInterface { renderer: Renderer2; cdRef: ChangeDetectorRef; options: GridsterConfig; calculateLayoutDebounce: Function; movingItem: GridsterItemS; previewStyle: Function; el: any; $options: GridsterConfigS; mobile: boolean; curWidth: number; curHeight: number; grid: Array<GridsterItemComponent>; columns: number; rows: number; curColWidth: number; curRowHeight: number; windowResize: Function | 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: GridsterItemComponent): void; removeItem(itemComponent: GridsterItemComponent): void; checkCollision(item: GridsterItemS): GridsterItemComponent | boolean; checkGridCollision(item: GridsterItemS): boolean; findItemWithItem(item: GridsterItemS): GridsterItemComponent | boolean; findItemsWithItem(item: GridsterItemS): Array<GridsterItemComponent>; autoPositionItem(itemComponent: GridsterItemComponent): void; getNextPossiblePosition(newItem: GridsterItemS): boolean; pixelsToPosition(x: number, y: number, roundingMethod: Function): [number, number]; pixelsToPositionX(x: number, roundingMethod: Function): number; pixelsToPositionY(y: number, roundingMethod: Function): number; positionXToPixels(x: number): number; positionYToPixels(y: number): number; }