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:
ciaranj
2014-02-14 13:09:03 +01:00
committed by vieron
parent 835c2df844
commit e21f63a05a
+6 -6
View File
@@ -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');
};
/**