User Country Map - Incorrect calculated height of world map in iframe #3935

Closed
anonymous-piwik-user opened this Issue May 13, 2013 · 3 comments

2 participants

@anonymous-piwik-user

I encountered a bug of incorrect calculated height of world map when integrating User Country Map widget in my site via iframe.

Please see the reproduction at http://jsfiddle.net/JcQmQ/. The widget is clipped by its containing iframe in the bottom.

Further investigation, i found that resize function in vistor-map.js that calculates dimension of map incorrectly.

var ratio, w, h,
map = this.map,
maxHeight = $(window).height() - (this.theWidget && this.theWidget.isMaximised ? 150 : 55);

In case of using iframe, the height of map is equals to iframe's height subtracted by 55px. But observing actual height of this widget, it should be subtracted by 79px.

Hope this help!

Keywords: UserCountryMap

@mattab
Piwik Open Source Analytics member

thanks for report. Do you suggest we replace 55 by 79 in this code? I could do this, please confirm.

@anonymous-piwik-user

Yes, please. Thanks for your supports.

thanks for report. Do you suggest we replace 55 by 79 in this code? I could do this, please confirm.

@mattab
Piwik Open Source Analytics member

In 23500db: Fixes #3935 Thanks for the patch!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment