Jump to content

ips.ui.photoLayout hard coded var


Flitterkill

Recommended Posts

I'm trying, hard, to work with the IPS system calls to get more than 5 images per row in a Gallery album.

ips.ui.photoLayout.js is the problem.

The two key elements to accomplishing this are an easily changeable data element on an OL:

data-ipsPhotoLayout-minHeight='300'

That's just a simple hook to change that number lower to allow for smaller thumbs however, about 1/3 of the way in on ips.ui.photoLayout which is called by the gallery.front.browse.list js controller attached to this OL... 

			/**
			 * Run the resizing process
			 *
			 * @returns 	{void}
			 */
			run = function (data) {
				var initialHeight = Math.max( options.minHeight, Math.floor( currentWidth / 5 ) );

That 5 effectively limits me to 5 or fewer images per row no matter how small the images themselves can be resized (I've only gotten 4 max that I've seen).  Changing that is not easily done.

Sure, I can dupe the entire method, change the number, rip out the original and force feed my copy into the system js build out routine but that's pretty hardcore (against terms?). Mixins don't appear to be do-able on these utility js things.

The truth of the matter is, and this really would make my day, just changing that hard coded 5 to a 12 would fix *everything*. At the stock data-ipsPhotoLayout-minHeight='300' it's pretty much business as usual but that 12 would allow changes (lower) to the minHeight to do something. It would let this js controller "breathe" and let through more per row. 

If you would argue that doing so might ruin the informational hovers that appear when images are cursored over, that's easily tackled but I can see the argument for stock users if they jack thier album full of super small images, in whch case passing through a data-attribute would work wonders here - either a bit flip to allow "more per row" or a straight pass through or something. Naturally this would have to be on the actual called controller which is gallery.front.browse.list (which then calls this ips.ui js thing).

I'll take either/or.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...