It is currently Thu Aug 16, 2018 6:36 am Advanced search

reflow() with maxHeight

Technical support, bug reports, feature requests and more.

reflow() with maxHeight

Postby ihtus » Thu Jul 12, 2018 4:58 pm

I am populating dynamically the popup content + reflow. When there is too much content, the popup gets too loooong.

How is it possible to limit the maxHeight of the popup?

Tried the following code.. but hs.maxHeight=600; has no effect.

Code: Select all
var expander=hs.getExpander();
hs.maxHeight=600;
expander.reflow();
ihtus
 
Posts: 57
Joined: Wed Jan 18, 2012 11:34 pm
Location: Toronto, Canada

Re: reflow() with maxHeight

Postby MisterNeutron » Sun Jul 22, 2018 7:05 pm

I don't know how to do what you're trying to do, but I do know that hs.maxHeight applies only to image expanders, not to HTML expanders, as the API makes clear.

Remember,HTML expanders are not responsive to the size of the viewport. In short, you have to set the size you want. You could perhaps use CSS to limit the height.
User avatar
MisterNeutron
 
Posts: 420
Joined: Sun Aug 18, 2013 1:20 pm

Re: reflow() with maxHeight

Postby ihtus » Mon Jul 23, 2018 8:39 pm

Mr Neutron, this is Mr Quark :D

Based on my notes (collected from forums/stackoverflow):
maxWidth will not work for HTML popups; these popups must have a defined width (default is 400px).
maxHeight works for HTML popups.


Speaking about my question, I got a solution by forcing some CSS with jquery

Code: Select all
jq('.highslide_body_container').find('div:first').css('max-height', '600px');
expander.reflow();
ihtus
 
Posts: 57
Joined: Wed Jan 18, 2012 11:34 pm
Location: Toronto, Canada


Return to Highslide JS Usage

Who is online

Users browsing this forum: No registered users and 0 guests