From df47a94e4062e9efa7c5a96475e992e78e15fd17 Mon Sep 17 00:00:00 2001 From: leontb99 <55995837+leontb99@users.noreply.github.com> Date: Fri, 16 Oct 2020 08:38:43 +0200 Subject: [PATCH] Update gridstack.jQueryUI.js Change to fix error mentioned in this thread: https://github.com/gridstack/gridstack.js/issues/858 Draggable/resizable should be initialized by this point anyways if you should be able to set options for them --- src/gridstack.jQueryUI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gridstack.jQueryUI.js b/src/gridstack.jQueryUI.js index 2be0ad98e..a01dd889c 100644 --- a/src/gridstack.jQueryUI.js +++ b/src/gridstack.jQueryUI.js @@ -31,7 +31,7 @@ JQueryUIGridStackDragDropPlugin.prototype.resizable = function(el, opts) { el = $(el); if (opts === 'disable' || opts === 'enable' || opts === 'destroy') { - el.resizable(opts); + el.resizable().resizable(opts); } else if (opts === 'option') { var key = arguments[2]; var value = arguments[3]; @@ -53,7 +53,7 @@ JQueryUIGridStackDragDropPlugin.prototype.draggable = function(el, opts) { el = $(el); if (opts === 'disable' || opts === 'enable' || opts === 'destroy') { - el.draggable(opts); + el.draggable().draggable(opts); } else { el.draggable($.extend({}, this.grid.opts.draggable, { containment: (this.grid.opts.isNested && !this.grid.opts.dragOut) ?