You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dobar dan!🤗
Your solution of representing masonry layout is very close to meet my needs, it's very clever.
But I'm little stuck: in my grid I have first element unique, that should always be in the first column, on the top. But with greedy algorithm it mostly appears in the second column. chronological algorithm doesn't make sense, since grid becomes look ugly. Do you have any solution of it?
The text was updated successfully, but these errors were encountered:
.forEach(item=>{letmin=sums.reduce((min,sum,index)=>sums[min]<=sum ? min : index,0)if(undefined!==item.item.dataset.preserve)min=0sums[min]+=item.valueitem._subset=min})
Hardcoded this logic in Greedy class algorithm. That's all I need for now: set specific element strictly first. TO DO: make this memorize it's markup position and preserve some elements directly on that place. Will come back, if I'll have any considerations, and, maybe, a PR.
Dobar dan!🤗
Your solution of representing masonry layout is very close to meet my needs, it's very clever.
But I'm little stuck: in my grid I have first element unique, that should always be in the first column, on the top. But with
greedy
algorithm it mostly appears in the second column.chronological
algorithm doesn't make sense, since grid becomes look ugly. Do you have any solution of it?The text was updated successfully, but these errors were encountered: