#3935 closed Bug (fixed)

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

Reported by: trietpham Owned by: mattab
Priority: normal Milestone: 1.12 - The Great 1.x Backlog
Component: Core Keywords: UserCountryMap
Cc: Sensitive: no

Description

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!

Change History (3)

comment:1 follow-up: Changed 11 months ago by matt (mattab)

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

comment:2 in reply to: ↑ 1 Changed 11 months ago by trietpham

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.

comment:3 Changed 11 months ago by matt (mattab)

  • Owner set to mattab
  • Resolution set to fixed
  • Status changed from new to closed

In 23500dbfadd29cfeb6a51cb2a99622b7ef11427a:

Fixes #3935 Thanks for the patch!

Note: See TracTickets for help on using tickets.