angular-gridster2
Advanced tools
Comparing version 13.2.0 to 13.2.1
@@ -41,3 +41,3 @@ import { GridsterConfigS } from './gridsterConfigS.interface'; | ||
windowResize: (() => void) | null; | ||
setGridDimensions: (() => void); | ||
setGridDimensions: () => void; | ||
dragInProgress: boolean; | ||
@@ -44,0 +44,0 @@ emptyCell: GridsterEmptyCell; |
@@ -31,5 +31,2 @@ import { NgZone } from '@angular/core'; | ||
enabled: boolean; | ||
dragStartFunction: (event: MouseEvent) => void; | ||
dragFunction: (event: MouseEvent) => void; | ||
dragStopFunction: (event: MouseEvent) => void; | ||
mousemove: () => void; | ||
@@ -54,7 +51,7 @@ mouseup: () => void; | ||
dragStart(e: MouseEvent): void; | ||
dragMove(e: MouseEvent): void; | ||
dragMove: (e: MouseEvent) => void; | ||
calculateItemPositionFromMousePosition(e: MouseEvent): void; | ||
calculateItemPositionWithScale(e: MouseEvent, scale: number): void; | ||
calculateItemPositionWithoutScale(e: MouseEvent): void; | ||
dragStop(e: MouseEvent): void; | ||
dragStop: (e: MouseEvent) => void; | ||
cancelDrag(): void; | ||
@@ -64,3 +61,3 @@ makeDrag(): void; | ||
toggle(): void; | ||
dragStartDelay(e: MouseEvent2): void; | ||
dragStartDelay: (e: MouseEvent2) => void; | ||
} |
@@ -6,24 +6,24 @@ import { GridsterComponentInterface } from './gridster.interface'; | ||
initialItem: GridsterItem | null; | ||
emptyCellClick: (() => void) | null; | ||
emptyCellClickTouch: (() => void) | null; | ||
emptyCellContextMenu: (() => void) | null; | ||
emptyCellDrop: (() => void) | null; | ||
emptyCellDrag: (() => void) | null; | ||
emptyCellDragTouch: (() => void) | null; | ||
emptyCellMMove: () => void; | ||
emptyCellMMoveTouch: () => void; | ||
emptyCellUp: () => void; | ||
emptyCellUpTouch: () => void; | ||
emptyCellMove: (() => void) | null; | ||
emptyCellExit: (() => void) | null; | ||
removeEmptyCellClickListenerFn: (() => void) | null; | ||
removeEmptyCellTouchendListenerFn: (() => void) | null; | ||
removeEmptyCellContextMenuListenerFn: (() => void) | null; | ||
removeEmptyCellDropListenerFn: (() => void) | null; | ||
removeEmptyCellMousedownListenerFn: (() => void) | null; | ||
removeEmptyCellTouchstartListenerFn: (() => void) | null; | ||
removeWindowMousemoveListenerFn: () => void; | ||
removeWindowTouchmoveListenerFn: () => void; | ||
removeWindowMouseupListenerFn: () => void; | ||
removeWindowTouchendListenerFn: () => void; | ||
removeEmptyCellDragoverListenerFn: (() => void) | null; | ||
removeDocumentDragendListenerFn: (() => void) | null; | ||
constructor(gridster: GridsterComponentInterface); | ||
destroy(): void; | ||
updateOptions(): void; | ||
emptyCellClickCb(e: MouseEvent): void; | ||
emptyCellContextMenuCb(e: MouseEvent): void; | ||
emptyCellDragDrop(e: DragEvent): void; | ||
emptyCellDragOver(e: DragEvent): void; | ||
emptyCellMouseDown(e: MouseEvent): void; | ||
emptyCellMouseMove(e: MouseEvent): void; | ||
emptyCellMouseUp(e: MouseEvent): void; | ||
emptyCellClickCb: (e: MouseEvent) => void; | ||
emptyCellContextMenuCb: (e: MouseEvent) => void; | ||
emptyCellDragDrop: (e: DragEvent) => void; | ||
emptyCellDragOver: (e: DragEvent) => void; | ||
emptyCellMouseDown: (e: MouseEvent) => void; | ||
emptyCellMouseMove: (e: MouseEvent) => void; | ||
emptyCellMouseUp: (e: MouseEvent) => void; | ||
getPixelsX(e: MouseEvent, rect: ClientRect): number; | ||
@@ -30,0 +30,0 @@ getPixelsY(e: MouseEvent, rect: ClientRect): number; |
@@ -1,2 +0,2 @@ | ||
import { ElementRef, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, EventEmitter } from "@angular/core"; | ||
import { ElementRef, NgZone, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, EventEmitter } from '@angular/core'; | ||
import { GridsterDraggable } from './gridsterDraggable.service'; | ||
@@ -3,0 +3,0 @@ import { GridsterResizable } from './gridsterResizable.service'; |
{ | ||
"name": "angular-gridster2", | ||
"version": "13.2.0", | ||
"version": "13.2.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -1,3 +0,3 @@ | ||
angular-gridster2 | ||
============== | ||
# angular-gridster2 | ||
[![npm version](https://badge.fury.io/js/angular-gridster2.svg)](https://badge.fury.io/js/angular-gridster2) | ||
@@ -18,3 +18,3 @@ [![dependencies Status](https://david-dm.org/tiberiuzuld/angular-gridster2/status.svg)](https://david-dm.org/tiberiuzuld/angular-gridster2) | ||
``npm install angular-gridster2 --save`` | ||
`npm install angular-gridster2 --save` | ||
@@ -31,4 +31,7 @@ Should work out of the box with webpack, respectively angular-cli. | ||
``` | ||
## Browser support | ||
What Angular supports [here](https://github.com/angular/angular) | ||
## How to use | ||
@@ -45,2 +48,3 @@ | ||
Initialize a simple dashboard: | ||
```typescript | ||
@@ -54,7 +58,7 @@ import { GridsterConfig, GridsterItem } from 'angular-gridster2'; | ||
} | ||
static itemResize(item, itemComponent) { | ||
console.info('itemResized', item, itemComponent); | ||
} | ||
ngOnInit() { | ||
@@ -65,3 +69,3 @@ this.options = { | ||
}; | ||
this.dashboard = [ | ||
@@ -72,11 +76,11 @@ {cols: 2, rows: 1, y: 0, x: 0}, | ||
} | ||
changedOptions() { | ||
this.options.api.optionsChanged(); | ||
} | ||
removeItem(item) { | ||
this.dashboard.splice(this.dashboard.indexOf(item), 1); | ||
} | ||
addItem() { | ||
@@ -89,4 +93,4 @@ this.dashboard.push({}); | ||
### Having iFrame in widgets content | ||
### Having iFrame in widgets content | ||
iFrames can interfere with drag/resize of widgets. For a workaround please read [this issue #233](https://github.com/tiberiuzuld/angular-gridster2/issues/233) | ||
@@ -97,16 +101,26 @@ | ||
Option 1 (without text selection): | ||
```html | ||
<gridster-item> | ||
<div (mousedown)="$event.stopPropagation()" (touchstart)="$event.stopPropagation()"> | ||
Some content to click without dragging the widget | ||
</div> | ||
<div class="item-buttons"> | ||
<button md-icon-button md-raised-button class="drag-handler"> | ||
<md-icon>open_with</md-icon> | ||
</button> | ||
<button md-icon-button md-raised-button class="remove-button" (click)="removeItem($event, item)" | ||
(touchstart)="removeItem($event, item)" mdTooltip="Remove"> | ||
<md-icon>clear</md-icon> | ||
</button> | ||
</div> | ||
<div | ||
(mousedown)="$event.stopPropagation()" | ||
(touchstart)="$event.stopPropagation()" | ||
> | ||
Some content to click without dragging the widget | ||
</div> | ||
<div class="item-buttons"> | ||
<button md-icon-button md-raised-button class="drag-handler"> | ||
<md-icon>open_with</md-icon> | ||
</button> | ||
<button | ||
md-icon-button | ||
md-raised-button | ||
class="remove-button" | ||
(click)="removeItem($event, item)" | ||
(touchstart)="removeItem($event, item)" | ||
mdTooltip="Remove" | ||
> | ||
<md-icon>clear</md-icon> | ||
</button> | ||
</div> | ||
</gridster-item> | ||
@@ -116,6 +130,7 @@ ``` | ||
Option 2 (with text selection): | ||
```html | ||
<gridster-item> | ||
<div class="gridster-item-content"> | ||
Some content to select and click without dragging the widget | ||
Some content to select and click without dragging the widget | ||
</div> | ||
@@ -126,4 +141,10 @@ <div class="item-buttons"> | ||
</button> | ||
<button md-icon-button md-raised-button class="remove-button" (click)="removeItem($event, item)" | ||
(touchstart)="removeItem($event, item)" mdTooltip="Remove"> | ||
<button | ||
md-icon-button | ||
md-raised-button | ||
class="remove-button" | ||
(click)="removeItem($event, item)" | ||
(touchstart)="removeItem($event, item)" | ||
mdTooltip="Remove" | ||
> | ||
<md-icon>clear</md-icon> | ||
@@ -138,2 +159,3 @@ </button> | ||
### Supporters | ||
@ea20140129 | ||
@@ -140,0 +162,0 @@ @matpag (Mattia Pagini) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1421930
10750
161