angular-gridster2
Advanced tools
Comparing version 4.0.3 to 4.1.0
@@ -32,2 +32,5 @@ "use strict"; | ||
widget = this.gridster.grid[i]; | ||
if (widget.$item.compactEnabled === false) { | ||
continue; | ||
} | ||
moved = this.moveUpTillCollision(widget); | ||
@@ -61,2 +64,5 @@ if (moved) { | ||
widget = this.gridster.grid[i]; | ||
if (widget.$item.compactEnabled === false) { | ||
continue; | ||
} | ||
moved = this.moveLeftTillCollision(widget); | ||
@@ -63,0 +69,0 @@ if (moved) { |
@@ -7,7 +7,11 @@ import { GridsterComponent } from './gridster.component'; | ||
emptyCellClick: Function | null; | ||
emptyCellClickTouch: Function | null; | ||
emptyCellContextMenu: Function | null; | ||
emptyCellDrop: Function | null; | ||
emptyCellDrag: Function | null; | ||
emptyCellDragTouch: Function | null; | ||
emptyCellMMove: Function; | ||
emptyCellMMoveTouch: Function; | ||
emptyCellUp: Function; | ||
emptyCellUpTouch: Function; | ||
emptyCellMove: Function | null; | ||
@@ -14,0 +18,0 @@ constructor(gridster: GridsterComponent); |
@@ -13,8 +13,12 @@ "use strict"; | ||
this.emptyCellClick = this.gridster.renderer.listen(this.gridster.el, 'click', this.emptyCellClickCb.bind(this)); | ||
this.emptyCellClickTouch = this.gridster.renderer.listen(this.gridster.el, 'touchend', this.emptyCellClickCb.bind(this)); | ||
} | ||
else if (!this.gridster.$options.enableEmptyCellClick && this.emptyCellClick) { | ||
else if (!this.gridster.$options.enableEmptyCellClick && this.emptyCellClick && this.emptyCellClickTouch) { | ||
this.emptyCellClick(); | ||
this.emptyCellClickTouch(); | ||
this.emptyCellClick = null; | ||
this.emptyCellClickTouch = null; | ||
} | ||
if (this.gridster.$options.enableEmptyCellContextMenu && !this.emptyCellContextMenu && this.gridster.$options.emptyCellContextMenuCallback) { | ||
if (this.gridster.$options.enableEmptyCellContextMenu && !this.emptyCellContextMenu && | ||
this.gridster.$options.emptyCellContextMenuCallback) { | ||
this.emptyCellContextMenu = this.gridster.renderer.listen(this.gridster.el, 'contextmenu', this.emptyCellContextMenuCb.bind(this)); | ||
@@ -38,6 +42,9 @@ } | ||
this.emptyCellDrag = this.gridster.renderer.listen(this.gridster.el, 'mousedown', this.emptyCellMouseDown.bind(this)); | ||
this.emptyCellDragTouch = this.gridster.renderer.listen(this.gridster.el, 'touchstart', this.emptyCellMouseDown.bind(this)); | ||
} | ||
else if (!this.gridster.$options.enableEmptyCellDrag && this.emptyCellDrag) { | ||
else if (!this.gridster.$options.enableEmptyCellDrag && this.emptyCellDrag && this.emptyCellDragTouch) { | ||
this.emptyCellDrag(); | ||
this.emptyCellDragTouch(); | ||
this.emptyCellDrag = null; | ||
this.emptyCellDragTouch = null; | ||
} | ||
@@ -101,3 +108,5 @@ }; | ||
this.emptyCellMMove = this.gridster.renderer.listen('window', 'mousemove', this.emptyCellMouseMove.bind(this)); | ||
this.emptyCellMMoveTouch = this.gridster.renderer.listen('window', 'touchmove', this.emptyCellMouseMove.bind(this)); | ||
this.emptyCellUp = this.gridster.renderer.listen('window', 'mouseup', this.emptyCellMouseUp.bind(this)); | ||
this.emptyCellUpTouch = this.gridster.renderer.listen('window', 'touchend', this.emptyCellMouseUp.bind(this)); | ||
}; | ||
@@ -116,3 +125,5 @@ GridsterEmptyCell.prototype.emptyCellMouseMove = function (e) { | ||
this.emptyCellMMove(); | ||
this.emptyCellMMoveTouch(); | ||
this.emptyCellUp(); | ||
this.emptyCellUpTouch(); | ||
var item = this.getValidItemFromEvent(e, this.initialItem); | ||
@@ -119,0 +130,0 @@ if (item) { |
@@ -37,2 +37,3 @@ "use strict"; | ||
resizeEnabled: undefined, | ||
compactEnabled: undefined, | ||
maxItemRows: undefined, | ||
@@ -39,0 +40,0 @@ minItemRows: undefined, |
@@ -9,2 +9,3 @@ export interface GridsterItem { | ||
resizeEnabled?: boolean; | ||
compactEnabled?: boolean; | ||
maxItemRows?: number; | ||
@@ -11,0 +12,0 @@ minItemRows?: number; |
@@ -34,4 +34,10 @@ "use strict"; | ||
if (e.clientX === undefined && e.touches) { | ||
e.clientX = e.touches[0].clientX; | ||
e.clientY = e.touches[0].clientY; | ||
if (e.touches && e.touches.length) { | ||
e.clientX = e.touches[0].clientX; | ||
e.clientY = e.touches[0].clientY; | ||
} | ||
else if (e.changedTouches && e.changedTouches.length) { | ||
e.clientX = e.changedTouches[0].clientX; | ||
e.clientY = e.changedTouches[0].clientY; | ||
} | ||
} | ||
@@ -38,0 +44,0 @@ }; |
{ | ||
"name": "angular-gridster2", | ||
"version": "4.0.3", | ||
"version": "4.1.0", | ||
"license": "MIT", | ||
@@ -49,17 +49,17 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@angular/animations": "5.0.2", | ||
"@angular/cdk": "5.0.0-rc0", | ||
"@angular/cli": "1.5.2", | ||
"@angular/common": "5.0.2", | ||
"@angular/compiler": "5.0.2", | ||
"@angular/compiler-cli": "5.0.2", | ||
"@angular/core": "5.0.2", | ||
"@angular/forms": "5.0.2", | ||
"@angular/http": "5.0.2", | ||
"@angular/language-service": "5.0.2", | ||
"@angular/material": "5.0.0-rc0", | ||
"@angular/platform-browser": "5.0.2", | ||
"@angular/platform-browser-dynamic": "5.0.2", | ||
"@angular/platform-server": "5.0.2", | ||
"@angular/router": "5.0.2", | ||
"@angular/animations": "5.0.5", | ||
"@angular/cdk": "5.0.0-rc.2", | ||
"@angular/cli": "1.5.5", | ||
"@angular/common": "5.0.5", | ||
"@angular/compiler": "5.0.5", | ||
"@angular/compiler-cli": "5.0.5", | ||
"@angular/core": "5.0.5", | ||
"@angular/forms": "5.0.5", | ||
"@angular/http": "5.0.5", | ||
"@angular/language-service": "5.0.5", | ||
"@angular/material": "5.0.0-rc.2", | ||
"@angular/platform-browser": "5.0.5", | ||
"@angular/platform-browser-dynamic": "5.0.5", | ||
"@angular/platform-server": "5.0.5", | ||
"@angular/router": "5.0.5", | ||
"@types/jasmine": "2.8.2", | ||
@@ -79,6 +79,6 @@ "@types/node": "8.0.53", | ||
"karma-coverage-istanbul-reporter": "1.3.0", | ||
"karma-jasmine": "1.1.0", | ||
"karma-jasmine": "1.1.1", | ||
"karma-jasmine-html-reporter": "0.2.2", | ||
"protractor": "5.2.0", | ||
"rxjs": "5.5.2", | ||
"rxjs": "5.5.3", | ||
"systemjs": "0.20.19", | ||
@@ -85,0 +85,0 @@ "ts-helpers": "1.1.2", |
@@ -205,2 +205,3 @@ angular-gridster2 | ||
resizeEnabled?: boolean; // override grid option resizable.enabled | ||
compactEnabled?: boolean; // disable compact | ||
maxItemRows?: number; // override grid option maxItemRows | ||
@@ -207,0 +208,0 @@ minItemRows?: number; // override grid option minItemRows |
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
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
171374
2990
274