<commit_before>define(['leaflet'], function (leaflet)
{
    /**
     * @constructor
     */
    function VoronoiView(map)
    {
        this._layer = leaflet.layerGroup().addTo(map);
    }

    /**
     * @param {VoronoiView.Polygon[]} polygons
     */
    VoronoiView.prototype.setPolygons = function(polygons)
    {
        this._layer.clearLayers();

        var voronoiLayer = this._layer;
        polygons.forEach(function(polygon) {
            leaflet.polygon(
                polygon.points.map(function(coord) { return leaflet.latLng([coord.lat, coord.lon]); }),
                {
                    fillColor: polygon.colour.toString(),
                    stroke: false,
                    fillOpacity: 0.5
                }
            ).addTo(voronoiLayer);
        });
    };

    /**
     * @param {GeoCoord[]} points
     * @param {Colour} colour
     * @constructor
     */
    VoronoiView.Polygon = function(points, colour)
    {
        this.points = points;
        this.colour = colour;
    };

    return VoronoiView;

});<commit_msg>Ensure voronoi cells are drawn below target circles.<commit_after>define(['leaflet'], function (leaflet)
{
    /**
     * @constructor
     */
    function VoronoiView(map)
    {
        this._layer = leaflet.layerGroup().addTo(map);
    }

    /**
     * @param {VoronoiView.Polygon[]} polygons
     */
    VoronoiView.prototype.setPolygons = function(polygons)
    {
        this._layer.clearLayers();

        var voronoiLayer = this._layer;
        polygons.forEach(function(polygon) {
            leaflet.polygon(
                polygon.points.map(function(coord) { return leaflet.latLng([coord.lat, coord.lon]); }),
                {
                    fillColor: polygon.colour.toString(),
                    stroke: false,
                    fillOpacity: 0.5
                }
            ).addTo(voronoiLayer).bringToBack();
        });
    };

    /**
     * @param {GeoCoord[]} points
     * @param {Colour} colour
     * @constructor
     */
    VoronoiView.Polygon = function(points, colour)
    {
        this.points = points;
        this.colour = colour;
    };

    return VoronoiView;

});
{'fraction_non_alphanumeric': 0.13093591516828032, 'fraction_numerical': 0.0018441678192715537, 'mean_word_length': 1.7468354430379747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7529353', 'n_tokens_mistral': 682, 'n_tokens_neox': 655, 'n_words': 99}