Skip to content

Commit

Permalink
remove whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
rharriso committed May 12, 2016
1 parent c572561 commit 30e235a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
19 changes: 19 additions & 0 deletions dist/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,21 @@
}
};

GridStack.prototype._triggerUpdateEvent = function(forceTrigger) {
var elements = this.grid.getDirtyNodes();
var hasChanges = false;

var eventParams = [];
if (elements && elements.length) {
eventParams.push(elements);
hasChanges = true;
}

if (hasChanges || forceTrigger === true) {
this.container.trigger('update', eventParams);
}
};

GridStack.prototype._triggerChangeEvent = function(forceTrigger) {
var elements = this.grid.getDirtyNodes();
var hasChanges = false;
Expand Down Expand Up @@ -1096,6 +1111,7 @@
self._triggerChangeEvent(forceNotify);

self.grid.endUpdate();
self._triggerUpdateEvent(forceNotify);

var nestedGrids = o.find('.grid-stack');
if (nestedGrids.length && event.type == 'resizestop') {
Expand Down Expand Up @@ -1416,6 +1432,7 @@
self._triggerChangeEvent();

self.grid.endUpdate();
self._triggerUpdateEvent();
};

GridStack.prototype.resize = function(el, width, height) {
Expand Down Expand Up @@ -1591,6 +1608,8 @@
'can_be_placed_with_respect_to_height', 'canBePlacedWithRespectToHeight');
GridStack.prototype._trigger_change_event = obsolete(GridStack.prototype._triggerChangeEvent,
'_trigger_change_event', '_triggerChangeEvent');
GridStack.prototype._trigger_update_event = obsolete(GridStack.prototype._triggerUpdateEvent,
'_trigger_update_event', '_triggerUpdateEvent');
GridStack.prototype._init_styles = obsolete(GridStack.prototype._initStyles,
'_init_styles', '_initStyles');
GridStack.prototype._update_styles = obsolete(GridStack.prototype._updateStyles,
Expand Down
Loading

0 comments on commit 30e235a

Please sign in to comment.