Add option to leave DOM in place when destroy() is called, add proper cleanup of generated_stylesheets. - #296
Open
billschaller wants to merge 170 commits into
Open
Add option to leave DOM in place when destroy() is called, add proper cleanup of generated_stylesheets.#296billschaller wants to merge 170 commits into
billschaller wants to merge 170 commits into
Conversation
In initial options you can disble draggin by adding disable_drag: true on options list at initialising gridster
Added disabled dragging init feature gridster.js - Thank you sbehrends
…M in place Added a new parameter 'removeDOM' to the destroy method - when false, destroy leaves the DOM in place, but just removes all the gridster business from it and removes classes and stylesheets it added. Closes #218
…andles" This reverts commit 9d077da.
Resize handles
If the element being dragged is inside a scrollable container, keeping the mouse in one of the sides of the container will trigger scroll.
Original code will break if jquery noconflict is applied, where $ and jQuery produces jQuery instance of different versions.
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.
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
for consistency with the `remove_widget`
…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.
fix(gridster): responsive width now resizes based off wrapper not window
typo on "the" in "inactivity over the last year"
…h has padding. It now limits the width of the widget to the containing element (also helps with scrollbars)
- delay moving components until drag is complete - allow exact position of grid components (do not move up)
Conflicts: src/jquery.gridster.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the option suggested in #218 to allow clean destroy by running destroy(false). This allows you to use gridster on an element, and then destroy gridster without destroying the original DOM elements. This is what I'm using to cleanly implement window resizing at the moment.
Add some code to properly strip out generated style tags when destroying the gridster instance. It also removes the entries in the Gridster.generated_stylesheets static var. This should allow multiple gridster instances to play more nicely on the same page. This should take care of #284, #227, and is a more complete solution than #287.