angular-gridster2
Advanced tools
Comparing version 3.11.0 to 3.11.1
@@ -116,2 +116,5 @@ "use strict"; | ||
GridsterComponent.prototype.emptyCellClickCb = function (e) { | ||
if (gridsterUtils_service_1.GridsterUtils.checkContentClassForEvent(this, e)) { | ||
return; | ||
} | ||
var item = this.getValidItemFromEvent(e); | ||
@@ -143,2 +146,5 @@ if (!item || this.movingItem) { | ||
GridsterComponent.prototype.emptyCellMouseDown = function (e) { | ||
if (gridsterUtils_service_1.GridsterUtils.checkContentClassForEvent(this, e)) { | ||
return; | ||
} | ||
e.preventDefault(); | ||
@@ -145,0 +151,0 @@ e.stopPropagation(); |
@@ -43,3 +43,2 @@ import { GridsterSwap } from './gridsterSwap.service'; | ||
constructor(gridsterItem: GridsterItemComponent, gridster: GridsterComponent); | ||
checkContentClass(target: any, current: any, contentClass: any): boolean; | ||
dragStart(e: any): void; | ||
@@ -46,0 +45,0 @@ dragMove(e: any): void; |
@@ -20,13 +20,2 @@ "use strict"; | ||
} | ||
GridsterDraggable.prototype.checkContentClass = function (target, current, contentClass) { | ||
if (target === current) { | ||
return false; | ||
} | ||
if (target.classList && target.classList.contains(contentClass)) { | ||
return true; | ||
} | ||
else { | ||
return this.checkContentClass(target.parentNode, current, contentClass); | ||
} | ||
}; | ||
GridsterDraggable.prototype.dragStart = function (e) { | ||
@@ -42,12 +31,5 @@ switch (e.which) { | ||
} | ||
if (this.gridster.$options.draggable.ignoreContent) { | ||
if (!this.checkContentClass(e.target, e.currentTarget, this.gridster.$options.draggable.dragHandleClass)) { | ||
return; | ||
} | ||
if (gridsterUtils_service_1.GridsterUtils.checkContentClassForEvent(this.gridster, e)) { | ||
return; | ||
} | ||
else { | ||
if (this.checkContentClass(e.target, e.currentTarget, this.gridster.$options.draggable.ignoreContentClass)) { | ||
return; | ||
} | ||
} | ||
if (this.gridster.$options.draggable.start) { | ||
@@ -54,0 +36,0 @@ this.gridster.$options.draggable.start(this.gridsterItem.item, this.gridsterItem, e); |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterDraggable":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"checkContentClass":[{"__symbolic":"method"}],"dragStart":[{"__symbolic":"method"}],"dragMove":[{"__symbolic":"method"}],"calculateItemPositionFromMousePosition":[{"__symbolic":"method"}],"dragStop":[{"__symbolic":"method"}],"cancelDrag":[{"__symbolic":"method"}],"makeDrag":[{"__symbolic":"method"}],"calculateItemPosition":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterDraggable":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"checkContentClass":[{"__symbolic":"method"}],"dragStart":[{"__symbolic":"method"}],"dragMove":[{"__symbolic":"method"}],"calculateItemPositionFromMousePosition":[{"__symbolic":"method"}],"dragStop":[{"__symbolic":"method"}],"cancelDrag":[{"__symbolic":"method"}],"makeDrag":[{"__symbolic":"method"}],"calculateItemPosition":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"GridsterDraggable":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"dragStart":[{"__symbolic":"method"}],"dragMove":[{"__symbolic":"method"}],"calculateItemPositionFromMousePosition":[{"__symbolic":"method"}],"dragStop":[{"__symbolic":"method"}],"cancelDrag":[{"__symbolic":"method"}],"makeDrag":[{"__symbolic":"method"}],"calculateItemPosition":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}]}}}},{"__symbolic":"module","version":1,"metadata":{"GridsterDraggable":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"./gridsterItem.component","name":"GridsterItemComponent"},{"__symbolic":"reference","module":"./gridster.component","name":"GridsterComponent"}]}],"dragStart":[{"__symbolic":"method"}],"dragMove":[{"__symbolic":"method"}],"calculateItemPositionFromMousePosition":[{"__symbolic":"method"}],"dragStop":[{"__symbolic":"method"}],"cancelDrag":[{"__symbolic":"method"}],"makeDrag":[{"__symbolic":"method"}],"calculateItemPosition":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}]}}}}] |
@@ -5,2 +5,4 @@ export declare class GridsterUtils { | ||
static checkTouchEvent(e: any): void; | ||
static checkContentClassForEvent(gridster: any, e: any): boolean; | ||
static checkContentClass(target: any, current: any, contentClass: any): boolean; | ||
} |
@@ -38,2 +38,25 @@ "use strict"; | ||
}; | ||
GridsterUtils.checkContentClassForEvent = function (gridster, e) { | ||
if (gridster.$options.draggable.ignoreContent) { | ||
if (!GridsterUtils.checkContentClass(e.target, e.currentTarget, gridster.$options.draggable.dragHandleClass)) { | ||
return true; | ||
} | ||
} | ||
else { | ||
if (GridsterUtils.checkContentClass(e.target, e.currentTarget, gridster.$options.draggable.ignoreContentClass)) { | ||
return true; | ||
} | ||
} | ||
}; | ||
GridsterUtils.checkContentClass = function (target, current, contentClass) { | ||
if (target === current) { | ||
return false; | ||
} | ||
if (target.classList && target.classList.contains(contentClass)) { | ||
return true; | ||
} | ||
else { | ||
return GridsterUtils.checkContentClass(target.parentNode, current, contentClass); | ||
} | ||
}; | ||
GridsterUtils.decorators = [ | ||
@@ -40,0 +63,0 @@ { type: core_1.Injectable }, |
{ | ||
"name": "angular-gridster2", | ||
"version": "3.11.0", | ||
"version": "3.11.1", | ||
"license": "MIT", | ||
@@ -67,3 +67,3 @@ "main": "dist/index.js", | ||
"codelyzer": "3.1.2", | ||
"core-js": "2.4.1", | ||
"core-js": "2.5.0", | ||
"gulp": "3.9.1", | ||
@@ -74,3 +74,3 @@ "gulp-clean": "0.3.2", | ||
"jasmine-core": "2.7.0", | ||
"jasmine-spec-reporter": "4.1.1", | ||
"jasmine-spec-reporter": "4.2.0", | ||
"karma": "1.7.0", | ||
@@ -88,3 +88,3 @@ "karma-chrome-launcher": "2.2.0", | ||
"tslib": "1.7.1", | ||
"tslint": "5.5.0", | ||
"tslint": "5.6.0", | ||
"typescript": "2.4.2", | ||
@@ -91,0 +91,0 @@ "zone.js": "0.8.16" |
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
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
261297
2540