Muuri: Item placeholder breaks when some of the items in the layout are hidden

Created on 29 Jan 2020  路  5Comments  路  Source: haltu/muuri

After i filter by color锛宒rag item will cause the grid to jam

console error:
muuri-0.8.0.js:389 Uncaught DOMException: Failed to execute 'animate' on 'Element': Partial keyframes are not supported.
at ItemAnimate.start (https://haltu.github.io/muuri/scripts/vendor/muuri-0.8.0.js:389:25)
at ItemDragPlaceholder._startAnimation (https://haltu.github.io/muuri/scripts/vendor/muuri-0.8.0.js:3191:15)
at Ticker._step (https://haltu.github.io/muuri/scripts/vendor/muuri-0.8.0.js:1263:24)

bug ready

Most helpful comment

Hi, Niklas, would you please make a patch release, like 0.8.1 to fix this issue? Thanks.

All 5 comments

Hi @qq164654109! Thanks for the report 馃憤However, I can't repro this. Could you give me some more info (OS, browser + version) and exact steps how to reproduce this?

win10 Google Chrome 79.0.3945.130

https://haltu.github.io/muuri/

GRID DEMO

just select any color to filter item(maybe twice)锛寉ou will see the bug when you drag item .

You can see it in the following link
https://github.com/qq164654109/my-vue/blob/master/public/images/step1.png
https://github.com/qq164654109/my-vue/blob/master/public/images/step2.png

Ah, yes! You found a bug in the ItemPlaceholder class 馃憤 Here https://github.com/haltu/muuri/blob/master/src/Item/ItemDragPlaceholder.js#L66 logic does not account for the fact that some of the items may be hidden. So currently the placeholder works properly only if none of the items are hidden.

I actually fixed this one already in the dev branch: https://github.com/haltu/muuri/blob/dev/src/Item/ItemDragPlaceholder.js#L94 ...but apparently forgot to file an issue about it here. I'll try to release the v0.9.0 as soon as possible, a _lot_ of good stuff and improvements coming along with it.

馃憤 good job!

Hi, Niklas, would you please make a patch release, like 0.8.1 to fix this issue? Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dedurus picture dedurus  路  4Comments

claudchan picture claudchan  路  6Comments

niklasramo picture niklasramo  路  7Comments

argie09 picture argie09  路  6Comments

bsherwoodofdaptiv picture bsherwoodofdaptiv  路  4Comments