<commit_before>/*
 * Copyright (c) 2008-2014 The Open Source Geospatial Foundation
 *
 * Published under the BSD license.
 * See https://github.com/geoext/geoext2/blob/master/license.txt for the full
 * text of the license.
 */

/*
 * @requires GeoExt/container/LayerLegend.js
 * @include GeoExt/FeatureRenderer.js
 */

/**
 * Create a vector legend.
 *
 * @class GeoExt.container.VectorLegend
 */
Ext.define('GeoExt.container.VectorLegend', {
    extend: 'GeoExt.container.LayerLegend',
    alias: 'widget.gx_vectorlegend',
    requires: [
        'Ext.layout.container.Column',
        'GeoExt.FeatureRenderer'
    ],
    alternateClassName: 'GeoExt.VectorLegend',

    statics: {
        /**
         * Checks whether the given layer record supports a vector legend.
         *
         * @param {GeoExt.data.LayerRecord} layerRecord Record containing a
         *     vector layer.
         * @return {Number} Either `1` when vector legends are supported or `0`.
         */
        supports: function(layerRecord) {
            return layerRecord.getLayer() instanceof OpenLayers.Layer.Vector ? 1 : 0;
        }
    },

    /**
     * The record containing a vector layer that this legend will be based on.<commit_msg>VectorLegend should require FeatureRenderer<commit_after>/*
 * Copyright (c) 2008-2014 The Open Source Geospatial Foundation
 *
 * Published under the BSD license.
 * See https://github.com/geoext/geoext2/blob/master/license.txt for the full
 * text of the license.
 */

/*
 * @requires GeoExt/container/LayerLegend.js
 * @requires GeoExt/FeatureRenderer.js
 */

/**
 * Create a vector legend.
 *
 * @class GeoExt.container.VectorLegend
 */
Ext.define('GeoExt.container.VectorLegend', {
    extend: 'GeoExt.container.LayerLegend',
    alias: 'widget.gx_vectorlegend',
    requires: [
        'Ext.layout.container.Column',
        'GeoExt.FeatureRenderer'
    ],
    alternateClassName: 'GeoExt.VectorLegend',

    statics: {
        /**
         * Checks whether the given layer record supports a vector legend.
         *
         * @param {GeoExt.data.LayerRecord} layerRecord Record containing a
         *     vector layer.
         * @return {Number} Either `1` when vector legends are supported or `0`.
         */
        supports: function(layerRecord) {
            return layerRecord.getLayer() instanceof OpenLayers.Layer.Vector ? 1 : 0;
        }
    },

    /**
     * The record containing a vector layer that this legend will be based on.
{'fraction_non_alphanumeric': 0.10981025433992733, 'fraction_numerical': 0.010496568429551878, 'mean_word_length': 2.633431085043988, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2998914', 'n_tokens_mistral': 743, 'n_tokens_neox': 707, 'n_words': 190}