From 90acf739763a7c73bb7e5d7e7f6e86556f41933a Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Thu, 21 Jul 2011 23:43:22 +0200 Subject: [PATCH] Added regions-compatiblity with old configuration. --- web/js/regions.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/js/regions.js b/web/js/regions.js index fd1426a5..9e1843dc 100644 --- a/web/js/regions.js +++ b/web/js/regions.js @@ -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));