haltu / muuri

Infinite responsive, sortable, filterable and draggable layouts
https://muuri.dev
MIT License
10.8k stars 643 forks source link

How to make a layout so that the height of the grid container is variable #508

Closed jiniC closed 2 years ago

jiniC commented 2 years ago

Thanks to murri for a lot of help! But I am not able to solve the following problem. I ask the problem I want to solve with an image. Are the following situations not supported in murri? 😥

  1. I want to move box 6 down to number 7, but it is not possible.

    murri test
  2. I want to move box 4 only below number 5. But when I try this it only swaps 4 and 5.

    murri test 2

    This is the code under test : https://codepen.io/jiniC/pen/rNGzoBb

niklasramo commented 2 years ago

Hi @jiniC ! Yep, what you are trying to do is not possible with the default layout algorithm. You can create your own layout algorithm though to allow any kind of layout. Here's an example: https://codepen.io/niklasramo/pen/LLbLLd.

jiniC commented 2 years ago

aha thanks for the reply :D