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

Skip to content

Commit 9c969ac

Browse files
committed
no resize directive
1 parent 85c3052 commit 9c969ac

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

gridstack.js

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -252,21 +252,24 @@
252252
self.grid.move_node(node, x, y);
253253
self._update_container_height();
254254
}
255-
}).resizable({
256-
autoHide: true,
257-
handles: 'se',
258-
minHeight: this.opts.cell_height - 10,
259-
minWidth: 70,
260-
261-
start: on_start_moving,
262-
stop: on_end_moving,
263-
resize: function (event, ui) {
264-
var width = Math.round(ui.size.width / cell_width),
265-
height = Math.round(ui.size.height / cell_height);
266-
self.grid.move_node(node, node.x, node.y, width, height);
267-
self._update_container_height();
268-
}
269255
});
256+
if (!el.attr('data-gs-no-resize')) {
257+
el.resizable({
258+
autoHide: true,
259+
handles: 'se',
260+
minHeight: this.opts.cell_height - 10,
261+
minWidth: 70,
262+
263+
start: on_start_moving,
264+
stop: on_end_moving,
265+
resize: function (event, ui) {
266+
var width = Math.round(ui.size.width / cell_width),
267+
height = Math.round(ui.size.height / cell_height);
268+
self.grid.move_node(node, node.x, node.y, width, height);
269+
self._update_container_height();
270+
}
271+
});
272+
}
270273
};
271274

272275
GridStack.prototype.add_widget = function (el, x, y, width, height) {

0 commit comments

Comments
 (0)