Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 56d9ec3

Browse files
committed
build js
1 parent bc4d076 commit 56d9ec3

File tree

5 files changed

+65
-80
lines changed

5 files changed

+65
-80
lines changed

dist/gridstack.all.js

Lines changed: 39 additions & 0 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: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.js

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -158,69 +158,6 @@
158158
return this;
159159
};
160160

161-
/**
162-
* @class JQueryUIGridStackDragDropPlugin
163-
* jQuery UI implementation of drag'n'drop gridstack plugin.
164-
*/
165-
function JQueryUIGridStackDragDropPlugin(grid) {
166-
GridStackDragDropPlugin.call(this, grid);
167-
}
168-
169-
GridStackDragDropPlugin.registerPlugin(JQueryUIGridStackDragDropPlugin);
170-
171-
JQueryUIGridStackDragDropPlugin.prototype = Object.create(GridStackDragDropPlugin.prototype);
172-
JQueryUIGridStackDragDropPlugin.prototype.constructor = JQueryUIGridStackDragDropPlugin;
173-
174-
JQueryUIGridStackDragDropPlugin.prototype.resizable = function(el, opts) {
175-
el = $(el);
176-
if (opts === 'disable' || opts === 'enable') {
177-
el.resizable(opts);
178-
} else {
179-
el.resizable(_.extend({}, this.grid.opts.resizable, {
180-
start: opts.start || function() {},
181-
stop: opts.stop || function() {},
182-
resize: opts.resize || function() {}
183-
}));
184-
}
185-
return this;
186-
};
187-
188-
JQueryUIGridStackDragDropPlugin.prototype.draggable = function(el, opts) {
189-
el = $(el);
190-
if (opts === 'disable' || opts === 'enable') {
191-
el.draggable(opts);
192-
} else {
193-
el.draggable(_.extend({}, this.grid.opts.draggable, {
194-
containment: this.grid.opts.isNested ? this.grid.container.parent() : null,
195-
start: opts.start || function() {},
196-
stop: opts.stop || function() {},
197-
drag: opts.drag || function() {}
198-
}));
199-
}
200-
return this;
201-
};
202-
203-
JQueryUIGridStackDragDropPlugin.prototype.droppable = function(el, opts) {
204-
el = $(el);
205-
if (opts === 'disable' || opts === 'enable') {
206-
el.droppable(opts);
207-
} else {
208-
el.droppable({
209-
accept: opts.accept
210-
});
211-
}
212-
return this;
213-
};
214-
215-
JQueryUIGridStackDragDropPlugin.prototype.isDroppable = function(el, opts) {
216-
el = $(el);
217-
return Boolean(el.data('droppable'));
218-
};
219-
220-
JQueryUIGridStackDragDropPlugin.prototype.on = function(el, eventName, callback) {
221-
$(el).on(eventName, callback);
222-
return this;
223-
};
224161

225162
var idSeq = 0;
226163

@@ -676,7 +613,7 @@
676613
if (this.opts.ddPlugin === false) {
677614
this.opts.ddPlugin = GridStackDragDropPlugin;
678615
} else if (this.opts.ddPlugin === null) {
679-
this.opts.ddPlugin = _.first(GridStackDragDropPlugin.registeredPlugins);
616+
this.opts.ddPlugin = _.first(GridStackDragDropPlugin.registeredPlugins) || GridStackDragDropPlugin;
680617
}
681618

682619
this.dd = new this.opts.ddPlugin(this);
@@ -1189,8 +1126,8 @@
11891126
node._beforeDragX = node.x;
11901127
node._beforeDragY = node.y;
11911128

1192-
el.resizable('option', 'minWidth', cellWidth * (node.minWidth || 1));
1193-
el.resizable('option', 'minHeight', strictCellHeight * (node.minHeight || 1));
1129+
self.dd.resizable(el, 'option', 'minWidth', cellWidth * (node.minWidth || 1));
1130+
self.dd.resizable(el, 'option', 'minHeight', strictCellHeight * (node.minHeight || 1));
11941131

11951132
if (event.type == 'resizestart') {
11961133
o.find('.grid-stack-item').trigger('resizestart');
@@ -1398,9 +1335,9 @@
13981335

13991336
node.noResize = !(val || false);
14001337
if (node.noResize || self._isOneColumnMode()) {
1401-
el.resizable('disable');
1338+
self.dd.resizable(el, 'disable');
14021339
} else {
1403-
el.resizable('enable');
1340+
self.dd.resizable(el, 'enable');
14041341
}
14051342
});
14061343
return this;

0 commit comments

Comments
 (0)