dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31615
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16144: GIS event labels removed.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 16144 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2014-07-15 23:31:56 +0200
message:
GIS event labels removed.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/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-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-07-15 19:23:23 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js 2014-07-15 21:30:42 +0000
@@ -738,14 +738,15 @@
});
};
- GIS.core.StyleMap = function(config) {
+ GIS.core.StyleMap = function(labelConfig) {
var defaults = {
fillOpacity: 1,
strokeColor: '#fff',
strokeWidth: 1,
pointRadius: 5,
labelAlign: 'cr',
- labelYOffset: 13
+ labelYOffset: 13,
+ fontFamily: 'arial,sans-serif,roboto,helvetica neue,helvetica,consolas'
},
select = {
fillOpacity: 0.9,
@@ -757,14 +758,12 @@
labelYOffset: 13
};
- defaults.label = '\${label}';
- defaults.fontFamily = 'arial,sans-serif,roboto,helvetica neue,helvetica,consolas';
-
- if (config) {
- defaults.fontSize = config.labelFontSize;
- defaults.fontWeight = config.labelFontWeight;
- defaults.fontStyle = config.labelFontStyle;
- defaults.fontColor = config.labelFontColor;
+ if (Ext.isObject(labelConfig) && labelConfig.labels) {
+ defaults.label = '\${label}';
+ defaults.fontSize = labelConfig.labelFontSize;
+ defaults.fontWeight = labelConfig.labelFontWeight;
+ defaults.fontStyle = labelConfig.labelFontStyle;
+ defaults.fontColor = labelConfig.labelFontColor;
}
return new OpenLayers.StyleMap({