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

can_move_to might have an incorrect check #430

Open begedin opened 10 years ago

begedin commented 10 years ago

At line 2466:

if (right_col > this.cols) {
  return false;
}

Shouldn't the check be made against this.options.max_cols instead?

The way it is currently, if I'm getting this correctly, every time a widget more than one column wide is placed last in the row, it will be automatically moved to the next available spot in the row below. Changing the check to max_cols makes it behave the way I'd expect it to behave.