Why does my multiple image home page change layout on refresh?
spider-t
Registered Users Posts: 443 Major grins
I have a bunch of pictures from an unlisted gallery showing on my homepage in that landscape collage style. Without changing my browser window size, I have seen this set of images show with 3 across the top, 4 across the top and 5 across the top. I can get different results by hitting the refresh button, or by navigating to another location and returning. See attached screen shots. Is this expected behavior? Feels broken to me.
thanks!
Trish
thanks!
Trish
0
Comments
The purpose of that feature is so that if you have all of your images the exact same aspect ratio, it tries not to arrange them as a perfectly regular grid, which would look a bit boring. If you've got plenty of variation in aspect ratio already, you don't really need this turned on.
Please check out my gallery of customisations for the New SmugMug, more to come!
That does not really explain that it recalculates all the time. Why not calculate it once when setting up that block?
I have three different renderings of that block depending on the mood of the algorithm, and when I turn that setting off, I have straggling image on bottom, see also http://www.dgrin.com/showthread.php?t=238525
Only when vary photo height is on, I get a decent rendering about a third of the time. With it off, I always get a straggler.
cheers
afx
There isn't really a good moment to calculate and store that, because virtually any operation you undertake on the site, completely unrelated to that block, can cause its contents to change (e.g. changing the keywords on a photo, uploading more photos, moving photos). In addition, since the layout is completely dependant on the exact size of your browser window, there isn't a good way of saving this in a way that makes it repeatable or useful for the second visit. Nothing you see on a Collage Landscape block bears any relationship to what it will look like on your customer's monitors, Vary Height enabled or no.
This is a strength of Vary Height - because stragglers are an unavoidable consequence of the line-by-line layout algorithm that Collage Landscape uses, if there was no randomisation you could be stuck with only that straggler layout forevermore, with no possibility of seeing that decent rendering. Randomised behaviour means that you don't end up seeing the same poor layout every single day, if it happened to end up making poor choices on your monitor. You get a more even mix of layouts.
Better layout algorithms lay out multiple rows of photos at the same time, so there is nothing special about the final row of photos and there isn't a tendency to produce stragglers. I developed such a layout:
http://www.sherlockphotography.org/Customisations/Collage-Landscape
But alas, we cannot use it because JavaScript is not supported. (It's still enabled in my galleries though, if you want to have a play).
Please check out my gallery of customisations for the New SmugMug, more to come!
Nope. It is a property of the block, again, completely static.
And it still does not explain why I would get three different layouts in exactly the same sized browser windows. Basically non-deterministic behavior from completely deterministic and static starting parameters.
cheers
afx
I'm saying that the algorithm has been created with that in mind, that the multiple photos block can easily be changed by a hundred different things they cannot keep track of, so it is infeasible to store and properly invalidate a layout.
It's intentionally randomised by turning on the Vary Height option?
Please check out my gallery of customisations for the New SmugMug, more to come!
That algorithm needs work.
cheers
afx
The answer to that is related to the answer to this:
The current algorithm cannot possibly eliminate stragglers, because it lays out one row of photos at a time in a greedy fashion without considering what the size of the remainder at the end will be. Consequently, at least 50% of the layouts will end up with a final row which is 50% full or less.
SmugMug could certainly make the random perturbation made by Vary Height the same on every browser window opening. However, if you're currently seeing a poor "straggler" layout on your screen, you would always see that forever, due to the deterministic layout for your screen size. Instead, if there is a per-run randomisation, you see an even mixture of all the nearby layouts including many good ones, so if the poor layout is very rare, you may never randomly land on it again. It turns "my layout always looks like crap" into "my layout usually looks fine, is sometimes great, and occasionally bad".
Meanwhile, no matter what you do, it's not going to look the same on your customer's screen, so it hardly matters either way.
No argument from me there.
Please check out my gallery of customisations for the New SmugMug, more to come!
Currently it is my layout looks like crap 66% of the time as only a third of the possible outcomes works without stragglers.
On all people's screens I looked at it, I had the same results as on my 30" and 24" desktop screens or my 15" notebook or 13" netbook because, as already mentioned, I use a fixed width box.
So that argument is bogus.
cheers
afx