test
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • metastorm Friend
    #184614

    Hi,

    At Ja News Featured module there are 3 big images with titles below in rotate. Lets number them as N1, N2, N3.
    N1 and N3 have a short Title (one line)
    N2 has a long 2-lines Title

    In this case the height of JNF with big images is fixed and = 1’st image with short Title (N1).
    When animation starts, no change of height is happened, so Title at N2 is partly cut (see screenshot).
    In html code:
    <div class=”ja-zinfp-featured-border” style=”height: 347px;”> – static, must be dynamic
    <div class=”ja-zinfp-featured clearfix” style=”height: 347px; width: 488px;”>
    <div class=”ja-zincontent-wrap active” style=”left: 0px; top: 0px; width: 488px; height: 347px;”>
    <div class=”ja-zincontent-wrap ” style=”left: 488px; top: 0px; width: 488px; height: 347px;”>
    <div class=”ja-zincontent-wrap ” style=”left: 488px; top: 0px; width: 488px; height: 347px;”>

    Bold – this must be 373 in this case

    But if I change order of featured items as N2-N1-N3 (item with long title go first!), then animation goes correct and height of div is changed accordingly to the title length.
    <div class=”ja-zinfp-featured-border” style=”height: 373px;”> – here height is dynamic (373px-347-347)

    I believe there is some problem in /templates/ja_nex/html/mod_janews_featured/nex/script.js , but unable to find it.

    Regards,


    1. jnf
    Ninja Lead Moderator
    #482305

    I would need to take a closer look at your site. I might be able to help you out. Right now its difficult to guess the issue and solution without actually being able to see it. Please pm me with URL and admin access on your site

    metastorm Friend
    #482333

    Please check PM

    Ninja Lead Moderator
    #482461

    <em>@metastorm 358611 wrote:</em><blockquote>Please check PM</blockquote>

    I fixed the problem on your site as follow

    Open /templates/ja_nex/html/mod_janews_featured/nex/script.js file
    from

    new Asset.images(this.panelwrap.getElements('img').get('src'), {
    onComplete: function(){this.panels.each(function(el) {
    el.setStyle('width', this.panelwrap.offsetWidth);
    el.setStyle('height', this.panelwrap.offsetHeight);
    }.bind(this))}.bind(this)
    });

    change to

    new Asset.images(this.panelwrap.getElements('img').get('src'), {
    onComplete: function(){this.panels.each(function(el) {
    var width = Math.max(this.panelwrap.offsetWidth, el.getWidth());
    var height = Max.max(this.panelwrap.offsetHeight, el.getHeight());
    this.panelwrap.setStyles({width: width, height: height});

    el.setStyle('width', width);
    el.setStyle('height', height);
    }.bind(this))}.bind(this)
    });

    Please check it again, let me know if it helps

    metastorm Friend
    #482587

    Hi Ninja Lead,

    Problem fixed, thank you! 🙂

    Regards,

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  metastorm 11 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum