Skip to content

Commit a286851

Browse files
committed
Merge branch 'develop'
2 parents 20fc3a3 + dfc9b42 commit a286851

File tree

11 files changed

+66
-27
lines changed

11 files changed

+66
-27
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ gridstack.js
22
============
33

44
[![Build Status](https://travis-ci.org/gridstack/gridstack.js.svg?branch=develop)](https://travis-ci.org/gridstack/gridstack.js)
5-
[![Coverage Status](https://coveralls.io/repos/github/troolee/gridstack.js/badge.svg?branch=master)](https://coveralls.io/github/troolee/gridstack.js?branch=master)
6-
[![Dependency Status](https://david-dm.org/troolee/gridstack.js.svg)](https://david-dm.org/troolee/gridstack.js)
7-
[![devDependency Status](https://david-dm.org/troolee/gridstack.js/dev-status.svg)](https://david-dm.org/troolee/gridstack.js#info=devDependencies)
5+
[![Coverage Status](https://coveralls.io/repos/github/gridstack/gridstack.js/badge.svg?branch=develop)](https://coveralls.io/github/gridstack/gridstack.js?branch=develop)
6+
[![Dependency Status](https://david-dm.org/gridstack/gridstack.js.svg)](https://david-dm.org/gridstack/gridstack.js)
7+
[![devDependency Status](https://david-dm.org/gridstack/gridstack.js/dev-status.svg)](https://david-dm.org/gridstack/gridstack.js#info=devDependencies)
88

99
gridstack.js is a mobile-friendly Javascript library for dashboard layout and creation. Making a drag-and-drop, multi-column dashboard has never been easier. gridstack.js allows you to build draggable, responsive bootstrap v3-friendly layouts. It also works great with [knockout.js](http://knockoutjs.com), [angular.js](https://angularjs.org), [ember](https://www.emberjs.com/).
1010

dist/gridstack-extra.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.all.js

Lines changed: 23 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.jQueryUI.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,7 @@
7777

7878
JQueryUIGridStackDragDropPlugin.prototype.droppable = function(el, opts) {
7979
el = $(el);
80-
if (opts === 'disable' || opts === 'enable') {
81-
el.droppable(opts);
82-
} else {
83-
el.droppable({
84-
accept: opts.accept
85-
});
86-
}
80+
el.droppable(opts);
8781
return this;
8882
};
8983

dist/gridstack.jQueryUI.min.js

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,6 +623,9 @@
623623
disableResize: opts.disableResize || false,
624624
rtl: 'auto',
625625
removable: false,
626+
removableOptions: _.defaults(opts.removableOptions || {}, {
627+
accept: '.' + opts.itemClass
628+
}),
626629
removeTimeout: 2000,
627630
verticalMarginUnit: 'px',
628631
cellHeightUnit: 'px',
@@ -770,9 +773,7 @@
770773
if (!self.opts.staticGrid && typeof self.opts.removable === 'string') {
771774
var trashZone = $(self.opts.removable);
772775
if (!this.dd.isDroppable(trashZone)) {
773-
this.dd.droppable(trashZone, {
774-
accept: '.' + self.opts.itemClass
775-
});
776+
this.dd.droppable(trashZone, self.opts.removableOptions);
776777
}
777778
this.dd
778779
.on(trashZone, 'dropover', function(event, ui) {
@@ -781,6 +782,7 @@
781782
if (node._grid !== self) {
782783
return;
783784
}
785+
el.data('inTrashZone', true);
784786
self._setupRemovingTimeout(el);
785787
})
786788
.on(trashZone, 'dropout', function(event, ui) {
@@ -789,6 +791,7 @@
789791
if (node._grid !== self) {
790792
return;
791793
}
794+
el.data('inTrashZone', false);
792795
self._clearRemovingTimeout(el);
793796
});
794797
}
@@ -1097,7 +1100,8 @@
10971100
}
10981101

10991102
if (event.type == 'drag') {
1100-
if (x < 0 || x >= self.grid.width || y < 0 || (!self.grid.float && y > self.grid.getGridHeight())) {
1103+
if (el.data('inTrashZone') || x < 0 || x >= self.grid.width || y < 0 ||
1104+
(!self.grid.float && y > self.grid.getGridHeight())) {
11011105
if (!node._temporaryRemoved) {
11021106
if (self.opts.removable === true) {
11031107
self._setupRemovingTimeout(el);

dist/gridstack.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.min.js

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "dist/gridstack.js",
66
"repository": {
77
"type": "git",
8-
"url": "git+https://github.com/troolee/gridstack.js.git"
8+
"url": "git+https://github.com/gridstack/gridstack.js.git"
99
},
1010
"scripts": {
1111
"build": "grunt ; doctoc ./README.md ; doctoc ./doc/README.md ; doctoc ./doc/CHANGES.md",
@@ -24,9 +24,9 @@
2424
],
2525
"license": "MIT",
2626
"bugs": {
27-
"url": "https://github.com/troolee/gridstack.js/issues"
27+
"url": "https://github.com/gridstack/gridstack.js/issues"
2828
},
29-
"homepage": "http://troolee.github.io/gridstack.js/",
29+
"homepage": "http://gridstack.github.io/gridstack.js/",
3030
"dependencies": {
3131
"jquery": "^3.1.0",
3232
"jquery-ui": "^1.12.0",

0 commit comments

Comments
 (0)