feat(resize): Add start/stop/resize callbacks

This commit is contained in:
activeworx
2013-10-28 23:52:17 +01:00
committed by vieron
co-authored by vieron
parent 277d8a7753
commit d4ec7140f7
+18
View File
@@ -100,6 +100,12 @@
* @param {Array} [options.resize.max_size] Limit widget dimensions
* when resizing. Array values should be integers:
* `[max_cols_occupied, max_rows_occupied]`
* @param {Function} [options.resize.start] Function executed
* when resizing starts.
* @param {Function} [otions.resize.resize] Function executed
* during the resizing.
* @param {Function} [options.resize.stop] Function executed
* when resizing stops.
*
* @constructor
*/
@@ -1043,6 +1049,10 @@
}).appendTo(this.$el);
this.$resized_widget.addClass('resizing');
if (this.options.resize.start) {
this.options.resize.start.call(this, event, ui, this.$resized_widget);
}
};
@@ -1069,6 +1079,10 @@
'min-height': ''
});
}, this), 300);
if (this.options.resize.stop) {
this.options.resize.stop.call(this, event, ui, this.$resized_widget);
}
};
/**
@@ -1135,6 +1149,10 @@
});
}
if (this.options.resize.resize) {
this.options.resize.resize.call(this, event, ui, this.$resized_widget);
}
this.resize_last_sizex = size_x;
this.resize_last_sizey = size_y;
};