Skip to content

Bugfix - add/remove items from muuri grid#17

Merged
aliciakw merged 1 commit into
masterfrom
bugfix/draggable-reorder
Jan 11, 2019
Merged

Bugfix - add/remove items from muuri grid#17
aliciakw merged 1 commit into
masterfrom
bugfix/draggable-reorder

Conversation

@aliciakw
Copy link
Copy Markdown
Contributor

@aliciakw aliciakw commented Jan 10, 2019

Add callbacks so that muuri grid will update when entries are added/removed.
This fixes...
an issue where adding a new entry would cause it to be positioned behind the existing grid, rather than becoming part of the existing grid.

But, not yet perfect...
Need to force grid to recalculate the height of all items + re-render when editingUUID changes.
Something like

updateGrid: function() {
  get(this, 'grid').refreshItems();
}.observes('editingUUID')

But "refreshItems" is not behaving as expected so this issue is still outstanding.

To Test:
set const DEV = true; in application.js & navigate to localhost:4200. Confirm that functionality is improved.

@aliciakw aliciakw force-pushed the bugfix/draggable-reorder branch from 5b7ee8d to 0bdcc37 Compare January 10, 2019 22:34
Comment thread app/controllers/index.js
set(this, 'editingUUID', uuid);
// TODO: re-enable this after muuri rerender on "iEditing"
// bug is fixed
// set(this, 'editingUUID', uuid);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So was this the problem child? While editing it doesn't factor in new elements?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the outstanding issue... the grid layout does not recalculate heights upon clicking "edit", and the method to force it to do so is not working.
screen shot 2019-01-11 at 11 32 13 am

@aliciakw aliciakw merged commit b2590ce into master Jan 11, 2019
@aliciakw aliciakw deleted the bugfix/draggable-reorder branch January 11, 2019 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants