New G2 layout: combined thumb/image/slideshow view

mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Thu, 2004-03-25 20:28

enigmah, that site uses java (not javascript).. looks like a good, simple panorama viewer. You could build a G2 module for displaying the applet with data from a gallery item.. however, I think the layouts default to "DownloadItem" for mime types they don't know about so I'm not sure how you could click on that item to view the panorama. Bharat may have some ideas on that. Please start a new forum topic if you wish to discuss further..

 
monza700
monza700's picture

Joined: 2004-03-02
Posts: 6
Posted: Mon, 2004-03-29 20:26
bharat wrote:
One problem that I encountered that we haven't fixed yet (and this is all on code I haven't checked in yet, since I have to commit it all at once or the G2 UI will be completely busted) is that if I am aiming for a 3x3 grid by using <DIV> blocks with <BR> elements to break them, if one of the grid elements has an extra wide caption, it causes that grid element to overflow pushing one of its row-mates over to the next row, then the <BR> fires so you wind up with a row with only 1 item.

The only solution I could think of for this was to use tables. Do you know of a way to work around that?

Possible solution:
Force the width of caption text using either php or javascript to count the number of characters... this may create mixed results depending on font and text size, but you could do a case statement or something (don't program much php yet) to insert "-<br>" into the text of any word containing "> n" number of characters. Javascript would allow you to see if the caption cell is greater than "x" pixels and then adjust your <div> width by adding "x" pixels to it. You could probably do a for loop or something to recalc the <div> width of each <div>.

Work with it... :-?

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2004-03-29 20:39

I modified the topic subject since Hybrid layout is now part of the G2 codebase..