Merge pull request #310 from crazydrecksack/master
[BUGFIX] offset problems for dragging and scaling with a lot of columns
This commit is contained in:
commit
83ac5af45f
4
dist/gridstack.js
vendored
4
dist/gridstack.js
vendored
|
@ -635,7 +635,7 @@
|
|||
var o = $(this);
|
||||
self.grid.clean_nodes();
|
||||
self.grid.begin_update(node);
|
||||
cell_width = Math.ceil(o.outerWidth() / o.attr('data-gs-width'));
|
||||
cell_width = o.outerWidth() / o.attr('data-gs-width');
|
||||
cell_height = self.opts.cell_height + self.opts.vertical_margin;
|
||||
self.placeholder
|
||||
.attr('data-gs-x', o.attr('data-gs-x'))
|
||||
|
@ -645,7 +645,7 @@
|
|||
.show();
|
||||
node.el = self.placeholder;
|
||||
|
||||
el.resizable('option', 'minWidth', cell_width * (node.min_width || 1));
|
||||
el.resizable('option', 'minWidth', Math.round(cell_width * (node.min_width || 1)));
|
||||
el.resizable('option', 'minHeight', self.opts.cell_height * (node.min_height || 1));
|
||||
};
|
||||
|
||||
|
|
|
@ -640,7 +640,7 @@
|
|||
var o = $(this);
|
||||
self.grid.clean_nodes();
|
||||
self.grid.begin_update(node);
|
||||
cell_width = Math.ceil(o.outerWidth() / o.attr('data-gs-width'));
|
||||
cell_width = o.outerWidth() / o.attr('data-gs-width');
|
||||
cell_height = self.opts.cell_height + self.opts.vertical_margin;
|
||||
self.placeholder
|
||||
.attr('data-gs-x', o.attr('data-gs-x'))
|
||||
|
@ -650,7 +650,7 @@
|
|||
.show();
|
||||
node.el = self.placeholder;
|
||||
|
||||
el.resizable('option', 'minWidth', cell_width * (node.min_width || 1));
|
||||
el.resizable('option', 'minWidth', Math.round(cell_width * (node.min_width || 1)));
|
||||
el.resizable('option', 'minHeight', self.opts.cell_height * (node.min_height || 1));
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue