Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Added and exposed ability to unregister grid #157

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/salvattore.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ self.registerGrid = function registerGrid (grid) {
};


self.unregisterGrid = function unregisterGrid (grid) {
var index = grids.indexOf(grid);
if (index > -1) {
grids.splice(index, 1);
}
};


self.init = function init() {
// adds required CSS rule to hide 'content' based
// configuration.
Expand All @@ -390,6 +398,7 @@ return {
appendElements: self.appendElements,
prependElements: self.prependElements,
registerGrid: self.registerGrid,
unregisterGrid: self.unregisterGrid,
recreateColumns: self.recreateColumns,
rescanMediaQueries: self.rescanMediaQueries,
init: self.init,
Expand All @@ -398,6 +407,7 @@ return {
append_elements: self.appendElements,
prepend_elements: self.prependElements,
register_grid: self.registerGrid,
unregister_grid: self.unregisterGrid,
recreate_columns: self.recreateColumns,
rescan_media_queries: self.rescanMediaQueries
};
Expand Down