fix(autogrow): refining autogrow_cols behavior and grid width issues

This commit is contained in:
vieron
2014-02-14 11:37:03 +01:00
parent 9796c44dc6
commit 835c2df844
2 changed files with 70 additions and 60 deletions

View File

@ -41,12 +41,7 @@
this.$element = el;
this.last_colliders = [];
this.last_colliders_coords = [];
if (typeof colliders === 'string' || colliders instanceof $) {
this.$colliders = $(colliders,
this.options.colliders_context).not(this.$element);
}else{
this.colliders = $(colliders);
}
this.set_colliders(colliders);
this.init();
}
@ -211,6 +206,16 @@
};
fn.set_colliders = function(colliders) {
if (typeof colliders === 'string' || colliders instanceof $) {
this.$colliders = $(colliders,
this.options.colliders_context).not(this.$element);
}else{
this.colliders = $(colliders);
}
};
//jQuery adapter
$.fn.collision = function(collider, options) {
return new Collision( this, collider, options );