ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.04k stars 1.2k forks source link

Wrong addition solved in add_faux_rows by adding parseInt #426

Open rept opened 10 years ago

rept commented 10 years ago

This solves https://github.com/ducksboard/gridster.js/issues/425.

The fn.add_faux_rows = function(rows) { var actual_rows = this.rows; var max_rows = actual_rows + (rows || 1);

The second part was being added as a string before this patch. This gave a huge row number and caused lots of lags. Now it flies again.

I think also related to:

https://github.com/ducksboard/gridster.js/issues/340 (see comments of canfiax)

jhowley89 commented 10 years ago

Is it worth doing this to line 3826 as well (columns)?

rept commented 10 years ago

@jhowley1989 good point, probably yes. I didn't experience any problems with it, but I assume this will cause the same problems.

rept commented 10 years ago

@jhowley1989 I also added it to the columns. Hope this will be pulled soon.

rept commented 9 years ago

It was confirmed that this also solves https://github.com/ducksboard/gridster.js/issues/340 Any idea when this will be pulled?

mrud commented 9 years ago

I encountered the same issue with the slowdown. This patch fixes it.

rept commented 9 years ago

@mrud great to hear. To bad it isn't being pulled, that would avoid hours of searching for something that is already fixed.

dsmorse commented 9 years ago

Looks great I merged it into my fork dsmorse/gridster.js