Added regions-compatiblity with old configuration.

This commit is contained in:
FrozenCow 2011-07-21 23:43:22 +02:00
parent 51457464c2
commit 90acf73976

View File

@ -2,6 +2,17 @@ var regionConstructors = {};
componentconstructors['regions'] = function(dynmap, configuration) {
// Compatibility with older configurations.
if (configuration.regionstyle) {
configuration.regionstyle = $.extend({
stroke: true,
color: configuration.strokeColor,
opacity: configuration.strokeOpacity,
weight: configuration.strokeWeight,
fill: true
}, configuration.regionstyle);
}
// Helper functions
latlng = function(x, y, z) {
return dynmap.getProjection().fromLocationToLatLng(new Location(undefined, x,y,z));