dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #39099
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19837: GIS minor select handler bug fixes.
------------------------------------------------------------
revno: 19837
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-08-24 18:07:14 +0200
message:
GIS minor select handler bug fixes.
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/plugin.html
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.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-mapping/plugin.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/plugin.html 2015-08-05 15:16:32 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/plugin.html 2015-08-24 16:07:14 +0000
@@ -34,6 +34,7 @@
el: "map1",
id: "jzxTpTUdISq",
crossDomain: false,
+ dashboard: true,
mapViews: [{
userOrgUnit: ['fdc6uOvgoji']
}]
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2015-08-24 14:51:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/core.js 2015-08-24 16:07:14 +0000
@@ -265,13 +265,13 @@
});
defaultHoverWindow.show();
-
- var eastX = gis.viewport.eastRegion.getPosition()[0],
- centerX = gis.viewport.centerRegion.getPosition()[0],
- centerRegionCenterX = centerX + ((eastX - centerX) / 2),
- centerRegionY = gis.viewport.centerRegion.getPosition()[1] + (GIS.app ? 32 : 0);
-
- defaultHoverWindow.setPosition(centerRegionCenterX - (defaultHoverWindow.getWidth() / 2), centerRegionY);
+
+ var cr = gis.viewport.centerRegion,
+ crp = cr.getPosition(),
+ x = crp[0] + (cr.getWidth() / 2) - (defaultHoverWindow.getWidth() / 2),
+ y = crp[1] + (GIS.app ? 32 : 0);
+
+ defaultHoverWindow.setPosition(x, y);
layer.registerMouseDownEvent();
};
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js 2015-08-24 14:51:10 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-mapping/scripts/map.js 2015-08-24 16:07:14 +0000
@@ -1722,13 +1722,13 @@
});
defaultHoverWindow.show();
-
- var eastX = gis.viewport.eastRegion.getPosition()[0],
- centerX = gis.viewport.centerRegion.getPosition()[0],
- centerRegionCenterX = centerX + ((eastX - centerX) / 2),
- centerRegionY = gis.viewport.centerRegion.getPosition()[1] + (GIS.app ? 32 : 0);
-
- defaultHoverWindow.setPosition(centerRegionCenterX - (defaultHoverWindow.getWidth() / 2), centerRegionY);
+
+ var cr = gis.viewport.centerRegion,
+ crp = cr.getPosition(),
+ x = crp[0] + (cr.getWidth() / 2) - (defaultHoverWindow.getWidth() / 2),
+ y = crp[1] + (GIS.app ? 32 : 0);
+
+ defaultHoverWindow.setPosition(x, y);
layer.registerMouseDownEvent();
};
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js 2015-08-24 14:51:10 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/map.js 2015-08-24 16:07:14 +0000
@@ -1722,13 +1722,13 @@
});
defaultHoverWindow.show();
-
- var eastX = gis.viewport.eastRegion.getPosition()[0],
- centerX = gis.viewport.centerRegion.getPosition()[0],
- centerRegionCenterX = centerX + ((eastX - centerX) / 2),
- centerRegionY = gis.viewport.centerRegion.getPosition()[1] + (GIS.app ? 32 : 0);
-
- defaultHoverWindow.setPosition(centerRegionCenterX - (defaultHoverWindow.getWidth() / 2), centerRegionY);
+
+ var cr = gis.viewport.centerRegion,
+ crp = cr.getPosition(),
+ x = crp[0] + (cr.getWidth() / 2) - (defaultHoverWindow.getWidth() / 2),
+ y = crp[1] + (GIS.app ? 32 : 0);
+
+ defaultHoverWindow.setPosition(x, y);
layer.registerMouseDownEvent();
};
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.js 2015-08-24 14:51:10 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/map.js 2015-08-24 16:07:14 +0000
@@ -1722,13 +1722,13 @@
});
defaultHoverWindow.show();
-
- var eastX = gis.viewport.eastRegion.getPosition()[0],
- centerX = gis.viewport.centerRegion.getPosition()[0],
- centerRegionCenterX = centerX + ((eastX - centerX) / 2),
- centerRegionY = gis.viewport.centerRegion.getPosition()[1] + (GIS.app ? 32 : 0);
-
- defaultHoverWindow.setPosition(centerRegionCenterX - (defaultHoverWindow.getWidth() / 2), centerRegionY);
+
+ var cr = gis.viewport.centerRegion,
+ crp = cr.getPosition(),
+ x = crp[0] + (cr.getWidth() / 2) - (defaultHoverWindow.getWidth() / 2),
+ y = crp[1] + (GIS.app ? 32 : 0);
+
+ defaultHoverWindow.setPosition(x, y);
layer.registerMouseDownEvent();
};