…when removing a widget, or when destroying the gridster instance.
Before this change, if you called destroy without `remove` set to true,
coords instances was leaking jQuery data objects.
Also nullified the gridmap, and faux_grid arrays.
by default jQuery’s `hide` and `show` methods are used. You could also
use fadeIn/fadeOut or write your own kind of jQuery plugin like
`$.fn.showInAFancyWay` and use `showInAFancyWay` as the value in the
show_method config option.
If you want to keep the previos behaviour, you need to set
`hide_method` option to `’fadeOut’`
Breaking Changes
`remove_widget` and `remove_all_widgets` methods not return a promise
instead of the gridster instance
Tests are build with mocha + chai, and you can run them from the command line with `grunt karma` or opening `test/index.html` in your browser.
This is a first approach, there are hundreds of tests more that should be added.
I’ve ported some tests on PRs but more needs to be done.
* commit '262d115cf8b5bdaed40a7e5b6aaa6df6e71b6a07':
Added swaping queue, better handling of large to small swaps
Added swaping queue, better handling of large to small swaps
More predictable default behavior
Updated Readme
Added property to prevent larger widget shifting
Added grid-swap behavior
* rebugger/gridster.js.git/resize-widget-dimensions:
fix min-width and min-height after resize
add resize_widget_dimension() resize widgets after initialization
fix min-width and min-height after resize
add resize_widget_dimension() resize widgets after initialization
* cpascu/gridster.js/faux-rows-patch:
Fixed typeof comparison to match against string.
Fixed issue where existing widget position would be overwritten on gridmap when adding a faux cell to accommodate another widget.
* rept/gridster.js/addition_problem_add_faux_rows:
Also added parseInt to the add_faux_cols method
Also added parseInt to the add_faux_cols method
Wrong addition solved in add_faux_rows by adding parseInt
Grunt changes
Add an optional final parameter to add_widget.
Bumping to v0.5.7
Grunt
Fix Widget Right Edge Collission Detection
re-name model_id parameter
add model_id parameter to add_widget method in order to create a relationship between widget and backbone model
Fix the memory leak that was incorrectly iterating rows and columns
Cache $(window) and $(this) selectors for performance
fix (Gridster.js): destroy resize_api