mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-28 18:41:40 +01:00
Added regions-compatiblity with old configuration.
This commit is contained in:
parent
51457464c2
commit
90acf73976
@ -2,6 +2,17 @@ var regionConstructors = {};
|
|||||||
|
|
||||||
componentconstructors['regions'] = function(dynmap, configuration) {
|
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
|
// Helper functions
|
||||||
latlng = function(x, y, z) {
|
latlng = function(x, y, z) {
|
||||||
return dynmap.getProjection().fromLocationToLatLng(new Location(undefined, x,y,z));
|
return dynmap.getProjection().fromLocationToLatLng(new Location(undefined, x,y,z));
|
||||||
|
Loading…
Reference in New Issue
Block a user