2

I have been using rwdImageMaps 1.6 with JQuery 3.5.1 for the past year on several projects without any issue.

Just today, I realize that the map areas are not working anymore. Coordinates return as NaN. Google Chrome - not working
Edge - not working
Firefox - still working

I tried using rwdImageMaps with JQuery 3.6.0 with the same result.

Samuel Tan
  • 31
  • 4

1 Answers1

1

I realized that the codes in rwdImageMaps that is retrieving the original image size weren't working anymore.

                var attrW = 'width',
                    attrH = 'height',
                    w = $that.attr(attrW),
                    h = $that.attr(attrH);

Changing these codes to the following solved the issue.

                var attrW = 'naturalWidth',
                    attrH = 'naturalHeight',
                    w = $that.prop(attrW),
                    h = $that.prop(attrH);

Sharing the findings here.

Samuel Tan
  • 31
  • 4