zer0net / ifs-master

IFS Master
http://127.0.0.1:43110/12MVkvYGcRW6u2NYbpfwVad1oQeyG4s9Er/
5 stars 1 forks source link

List Entries: Stop the animation re-sorting, display variable grid as it ends up shown right away #133

Closed haschimoto closed 6 years ago

haschimoto commented 6 years ago

@dnelband : please fix this next.

dnelband commented 6 years ago

Hi Clemens, im working on it but the api has no built in stop animation, so i need to do a work around. Im on it

dnelband commented 6 years ago

on first load it shows it without animated resorting, but when user re-sorts in any way it still moves, but less of course. is it ok or should i make it without animation at all?

dnelband commented 6 years ago

it seems that the animation is really build in with this library, i'll try to find another one without animation

dnelband commented 6 years ago

i've managed to remove most of the animation at first load, but the initial visual sorting seems to be necessary for the masonry effect. i've tried a couple of other libraries but they all have this default animation. please check it now, is this ok? if not then we'll probably have to think about another solution other then the masonry look (which is a shame cause imo it looks good). i think now without the extra sorting it looks ok, but if not we can just make it an equal sized tile grid, though it wouldnt look as nice

haschimoto commented 6 years ago

it looks broken: tiles heights seem not correct or sometimes "underlap" other tiles: snap 2017-10-21 at 14 21 21

dnelband commented 6 years ago

this happens due to the fact that the images are loaded only after the DOM (html elements) are ready, so the masonry renders the height of the tiles without the full image loaded, which results in this error, 2 solutions: 1 - set a default height for the items img height - doesnt effect loading time & looks more or less normal 2 - post-loading, get the height of every image & set the item's height while hiding the items until it is calculated / resort once all the image heights

obviously the first option is the better of the two, but the second one is also an option if its important for you to have the different sizes. ive implemented the first one, let me know if its ok