Forum
Welcome, Guest

Image size problem (tab template)
(1 viewing) (1) Guest
Ask all your support questions for SOBI2 JView Gallery Plugin here.
  • Page:
  • 1
  • 2

TOPIC: Image size problem (tab template)

Image size problem (tab template) 1 year, 8 months ago #1722

Hello,

I got a serious problem : I use the photo gallery with a tab template (derived from "advanced template").
When the Sobi2 entry is loading on another tab than the one of the gallery, pics does'nt have the right dimensions.
(see capture 1).
When the page is re-loading, all become ok.

I tried to put the plugin in first position in Sobi2 plugins, but it change nothing.

Can you help me please ?

Thanks,

Francois
Attachments:

Re:Image size problem (tab template) 1 year, 7 months ago #1734

After a few hours of search, I've found a bug in your code.
The correction of the bug seems evident, and the problem of size of images on the tab is fixed :
in file jquery.cj-object-scaler.js on line 219 :

if (sys.elem.nodeName === "IMG") {
// to fix the weird width/height caching issue we set the image dimensions to be auto;
jQuery(sys.elem).width("auto");
jQuery(sys.elem).height("auto");
// wait until the image is loaded before scaling
jQuery(sys.elem).imagesLoaded(function () {
scaleObj(this);
} //); FNG
} else {
// scale immediately
scaleObj(jQuery(sys.elem));
}
//scaleObj(jQuery(sys.elem)); //FNG


But now there is another problem : the label shown on the caption, for all the images, is always the "firstlabel", label of the first image.
Please could you help me to correct this ?

Thanks

Francois

Re:Image size problem (tab template) 1 year, 7 months ago #1739

  • nicholas
  • OFFLINE
  • Moderator
  • Developing for Joomla since it was born!
  • Posts: 1197
Hello Francois -

We are sorry you had a problem. There is another version of this software due out, and we will check it to see how it operates under this condition and let you know shortly.

Regards,
Nicholas
CIO - CorFun, Inc.
Publisher - orthodoxbiz.com
Webmaster - Orthodox Christian Network

Re:Image size problem (tab template) 1 year, 7 months ago #1741

  • jerry
  • OFFLINE
  • Moderator
  • Posts: 407
First of all, the code you are changing is not "our" code. It is a Jquery plugin that we are using.

Second, the change you made is invalid code. The else portion of the "if" test checking for IMG elements is now inside of the imagesLoaded anonymous function.

Having broken the JS is probably why the title swap JS isn't working.

Can you give me a link so I can check out the error? If not, can you send me the template so I can test it my self?

Jerry

Re:Image size problem (tab template) 1 year, 7 months ago #1760

Thanks Nicholas and Jerry,

First, sorry for my stupid conclusion... Maybe too much wiskhy.
But the wrong modification I've found give a right effect on the scale of image.

My project is still on localhost, but I have made a demo site for you :

frang.fr/04-terrains-j03/

On the "Test1" item of Sobi2, you ca see the problem when the page is not loading on the "Photos" tab (if the page is loaded on this tab, everything's right).
On the "Documents" tab, you can download a joomlapack installer of the demo site, including all the code, template, and so on.

Thanks to analyse the problem.
Kinds regards

François

Re:Image size problem (tab template) 1 year, 7 months ago #1761

  • jerry
  • OFFLINE
  • Moderator
  • Posts: 407
This appears to be a timing issue. If you click to show the details page. Then click on the photos tab, everything is skewed. If you then just refresh the page, everything straightens out. If you then got back to the vcard page (without leaving the photo tab) and click the details page link again, it comes up perfectly.

Can you send me Super-admin access to that test that you set up? I want to try something.

Jerry
  • Page:
  • 1
  • 2
Time to create page: 0.57 seconds

Login