dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33786
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17307: DV comp fix for IE9/10.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 17307 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2014-10-29 00:54:15 +0100
message:
DV comp fix for IE9/10.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2014-10-21 16:30:56 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-visualizer/scripts/core.js 2014-10-28 23:49:56 +0000
@@ -2356,17 +2356,19 @@
return function() {
if (this.items) {
var title = this.items[0],
+ titleWidth = Ext.isIE ? title.el.dom.scrollWidth : title.el.getWidth(),
+ titleXFallback = 10,
legend = this.legend,
legendCenterX,
titleX;
-
+
if (this.legend.position === 'top') {
legendCenterX = legend.x + (legend.width / 2);
- titleX = legendCenterX - (title.el.getWidth() / 2);
+ titleX = titleWidth ? legendCenterX - (titleWidth / 2) : titleXFallback;
}
else {
var legendWidth = legend ? legend.width : 0;
- titleX = (this.width / 2) - (title.el.getWidth() / 2);
+ titleX = titleWidth ? (this.width / 2) - (titleWidth / 2) : titleXFallback;
}
title.setAttributes({