Merge remote branch 'upstream/master'

This commit is contained in:
Mike Primm 2011-08-10 14:55:07 -05:00
commit 641406a68e
2 changed files with 17 additions and 6 deletions

View File

@ -29,6 +29,12 @@
<descriptors>
<descriptor>src/main/assembly/package.xml</descriptor>
</descriptors>
<!-- Hack for bug in maven-assembly: http://jira.codehaus.org/browse/MASSEMBLY-449 -->
<archiverConfig>
<fileMode>420</fileMode> <!-- 420(dec) = 644(oct) -->
<directoryMode>493</directoryMode> <!-- 493(dec) = 755(oct) -->
<defaultDirectoryMode>493</defaultDirectoryMode>
</archiverConfig>
</configuration>
<executions>
<execution>

View File

@ -14,7 +14,7 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
return boxCreator(ArrayMax(xs), ArrayMin(xs), region['max-y'], region['min-y'], ArrayMax(zs), ArrayMin(zs));
}
if(!region.min || !region.max)
return [];
return null;
if(region.max.y <= region.min.y)
region.min.y = region.max.y - 1;
return boxCreator(region.max.x, region.min.x, region.max.y, region.min.y, region.max.z, region.min.z);
@ -25,11 +25,16 @@ regionConstructors['WorldGuard'] = function(dynmap, configuration) {
$.getJSON('standalone/'+regionFile, function(data) {
var boxLayers = [];
$.each(data, function(name, region) {
var boxLayer = createBoxFromRegion(region, configuration.createBoxLayer);
boxLayer.bindPopup(configuration.createPopupContent(name, region));
boxLayers.push(boxLayer);
// Only handle cuboids for the moment (therefore skipping 'global')
if (region.type === 'cuboid') {
var boxLayer = createBoxFromRegion(region, configuration.createBoxLayer);
// Skip errorous regions.
if (boxLayer) {
boxLayer.bindPopup(configuration.createPopupContent(name, region));
boxLayers.push(boxLayer);
}
}
});
configuration.result(new L.LayerGroup(boxLayers));