mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
fix(resize.stop): Call resize.stop at the latest possible moment
Previously the resize.stop callback was being called before the widget had reached the end size that Gridster would make it (the widget grows to match the placeholder size after releasing the drag) This change pushes the resize.stop callback to the last possible moment where the size of the widget the callback receives is more likely to be correct. Signed-off-by: ciaranj <ciaranj@gmail.com> Conflicts: src/jquery.gridster.js
This commit is contained in:
@@ -1162,6 +1162,12 @@
|
||||
'min-width': '',
|
||||
'min-height': ''
|
||||
});
|
||||
|
||||
if (this.options.resize.stop) {
|
||||
this.options.resize.stop.call(this, event, ui, this.$resized_widget);
|
||||
}
|
||||
|
||||
this.$el.trigger('gridster:resizestop');
|
||||
}, this), 300);
|
||||
|
||||
this.set_dom_grid_width();
|
||||
@@ -1169,12 +1175,6 @@
|
||||
if (this.options.autogrow_cols) {
|
||||
this.drag_api.set_limits(this.cols * this.min_widget_width);
|
||||
}
|
||||
|
||||
if (this.options.resize.stop) {
|
||||
this.options.resize.stop.call(this, event, ui, this.$resized_widget);
|
||||
}
|
||||
|
||||
this.$el.trigger('gridster:resizestop');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user