views_nivo_slider/js/views_nivo-slider.js has a typo where the width and height values are becoming confused.

By the way: I have had this module trip up other scripts when I apply Drupal's performance javascript optimisation.

CommentFileSizeAuthor
#6 wmax-989410-6.patch658 bytesckng

Comments

jazzitup’s picture

@smilne23: If you successfully resolved your issue, you can submit a patch as well.

Aurochs’s picture

Guess he means that this one

       hmax =  (vns.data('hmax') > $(this).height()) ? vns.data('hmax') : $(this).height();
      wmax =  (vns.data('wmax') > $(this).width()) ? vns.data('hmax') : $(this).width();

must be corrected as follows:

      hmax =  (vns.data('hmax') > $(this).height()) ? vns.data('hmax') : $(this).height();
      wmax =  (vns.data('wmax') > $(this).width()) ? vns.data('wmax') : $(this).width();

Am I right?

pedrofaria’s picture

Assigned: Unassigned » pedrofaria
Status: Active » Needs review

what? i don't understand your issue... :(

Pedro

jazzitup’s picture

I'm reading this thread for the fifth time and I must say this thread is a winner of all of them out there.

digi24’s picture

I agree with Aurochs, there is a hmax instead of a wmax in the relevant line:

Index: views_nivo_slider.js
===================================================================
--- views_nivo_slider.js        (revision 2656)
+++ views_nivo_slider.js        (working copy)
@@ -10,7 +10,7 @@
     vns.data('hmax', 0).data('wmax', 0);
     $('img', vns).each(function () {
       hmax =  (vns.data('hmax') > $(this).height()) ? vns.data('hmax') : $(this).height();
-      wmax =  (vns.data('wmax') > $(this).width()) ? vns.data('hmax') : $(this).width();
+      wmax =  (vns.data('wmax') > $(this).width()) ? vns.data('wmax') : $(this).width();

       vns.width(wmax).height(hmax).data('hmax', hmax).data('wmax', wmax);
     });
ckng’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new658 bytes

As patch

ckng’s picture

Status: Reviewed & tested by the community » Fixed

Committed to both D6 & D7 branch.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.